mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
popovers: Use keys instead of names for tab navigation in profile modal.
We used name parameter in tab component callback to handle our custom logic when switching tabs in profile modal. Using name here invites a posible bug as these name are tagged for translation. So to avoid this we switch to use key (html id for these tabs) for this as they are always constant.
This commit is contained in:
committed by
Tim Abbott
parent
e10a315efd
commit
6cce478bce
@@ -431,11 +431,11 @@ export function show_user_profile(user) {
|
||||
callback(name, key) {
|
||||
$(".tabcontent").hide();
|
||||
$("#" + key).show();
|
||||
switch (name) {
|
||||
case "User groups":
|
||||
switch (key) {
|
||||
case "groups-tab":
|
||||
render_user_group_list(groups_of_user, user);
|
||||
break;
|
||||
case "Streams":
|
||||
case "streams-tab":
|
||||
render_user_stream_list(user_streams, user);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user