mirror of https://github.com/NekoX-Dev/NekoX.git
Add event log menu to profile activity
This commit is contained in:
parent
ad66247fbe
commit
8e94ff4b5b
|
@ -258,6 +258,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
|||
private final static int statistics = 19;
|
||||
private final static int start_secret_chat = 20;
|
||||
private final static int gallery_menu_save = 21;
|
||||
private final static int event_log = 22;
|
||||
|
||||
private Rect rect = new Rect();
|
||||
|
||||
|
@ -1241,6 +1242,8 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
|||
}
|
||||
} else if (id == leave_group) {
|
||||
leaveChatPressed();
|
||||
} else if (id == event_log) {
|
||||
presentFragment(new ChannelAdminLogActivity(currentChat));
|
||||
} else if (id == edit_channel) {
|
||||
Bundle args = new Bundle();
|
||||
args.putInt("chat_id", chat_id);
|
||||
|
@ -4372,6 +4375,9 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
|||
otherItem.addSubItem(leave_group, R.drawable.msg_leave, LocaleController.getString("LeaveChannelMenu", R.string.LeaveChannelMenu));
|
||||
}
|
||||
}
|
||||
if (ChatObject.hasAdminRights(currentChat)) {
|
||||
otherItem.addSubItem(event_log, R.drawable.group_log, LocaleController.getString("EventLog", R.string.EventLog));
|
||||
}
|
||||
} else {
|
||||
editItemVisible = true;
|
||||
if (!ChatObject.isKickedFromChat(chat) && !ChatObject.isLeftFromChat(chat)) {
|
||||
|
|
Loading…
Reference in New Issue