mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 03:53:50 +00:00 
			
		
		
		
	message_edit_notice_tooltip: Rewrite to fix inverted check.
Apparently, abece73c5a had misconverted
the case where edit history is disabled.
			
			
This commit is contained in:
		| @@ -364,15 +364,16 @@ export function initialize(): void { | |||||||
|         }, |         }, | ||||||
|         onShow(instance) { |         onShow(instance) { | ||||||
|             const $elem = $(instance.reference); |             const $elem = $(instance.reference); | ||||||
|             assert(message_lists.current !== undefined); |  | ||||||
|             const message_id = Number($elem.closest(".message_row").attr("data-message-id")); |             const message_id = Number($elem.closest(".message_row").attr("data-message-id")); | ||||||
|  |  | ||||||
|  |             assert(message_lists.current !== undefined); | ||||||
|             const message_container = message_lists.current.view.message_containers.get(message_id); |             const message_container = message_lists.current.view.message_containers.get(message_id); | ||||||
|             assert(message_container !== undefined); |             assert(message_container !== undefined); | ||||||
|             const last_edit_timestr = get_last_edit_timestr(message_container.msg); |             const last_edit_timestr = get_last_edit_timestr(message_container.msg); | ||||||
|             instance.setContent( |             instance.setContent( | ||||||
|                 parse_html( |                 parse_html( | ||||||
|                     render_message_edit_notice_tooltip({ |                     render_message_edit_notice_tooltip({ | ||||||
|                         message_container, |                         moved: message_container.moved, | ||||||
|                         last_edit_timestr, |                         last_edit_timestr, | ||||||
|                         realm_allow_edit_history: realm.realm_allow_edit_history, |                         realm_allow_edit_history: realm.realm_allow_edit_history, | ||||||
|                     }), |                     }), | ||||||
|   | |||||||
| @@ -1,11 +1,15 @@ | |||||||
| <div> | <div> | ||||||
|     <div>{{t "View edit history"}}</div> |  | ||||||
|     {{#if realm_allow_edit_history}} |     {{#if realm_allow_edit_history}} | ||||||
|         {{#if message_container/moved}} |     <div>{{t "View edit history"}}</div> | ||||||
|             <div class="tooltip-inner-content italic">{{t 'Last moved {last_edit_timestr}.'}}</div> |     {{/if}} | ||||||
|  |     <div class="tooltip-inner-content italic"> | ||||||
|  |         {{#if moved}} | ||||||
|  |         {{t 'Last moved {last_edit_timestr}.'}} | ||||||
|         {{else}} |         {{else}} | ||||||
|             <div class="tooltip-inner-content italic">{{t 'Last edited {last_edit_timestr}.'}}</div> |         {{t 'Last edited {last_edit_timestr}.'}} | ||||||
|         {{/if}} |  | ||||||
|         {{/if}} |         {{/if}} | ||||||
|  |     </div> | ||||||
| </div> | </div> | ||||||
|  | {{#if realm_allow_edit_history}} | ||||||
| {{tooltip_hotkey_hints "Shift" "H"}} | {{tooltip_hotkey_hints "Shift" "H"}} | ||||||
|  | {{/if}} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user