mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	message edit: Only enable left-arrow-editing for content.
We no longer let the left arrow put you into the message edit UI for a message where you can only edit topics, since that is just confusing to most users. This change also improves error handling a bit, and it removes an unnecessary call to rows.id(). Finally, it moves some logic out of message_list.js, so that we don't have a circular dependency for this codepath. Fixes #4259
This commit is contained in:
		@@ -645,18 +645,13 @@ exports.MessageList.prototype = {
 | 
			
		||||
        }, 0);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    get_last_own_editable_message: function MessageList_get_last_own_editable_message() {
 | 
			
		||||
    get_last_message_sent_by_me: function () {
 | 
			
		||||
        var msg_index = _.findLastIndex(this._items, {sender_id: page_params.user_id});
 | 
			
		||||
        if (msg_index === -1) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        var msg = this._items[msg_index];
 | 
			
		||||
        var msg_editability_type = message_edit.get_editability(msg, 5);
 | 
			
		||||
        if (msg_editability_type !== message_edit.editability_types.NO &&
 | 
			
		||||
            msg_editability_type !== message_edit.editability_types.NO_LONGER) {
 | 
			
		||||
            return msg;
 | 
			
		||||
        }
 | 
			
		||||
        return;
 | 
			
		||||
        return msg;
 | 
			
		||||
    },
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user