hide search and submit button if not admin

This commit is contained in:
Riko Sakurauchi 2020-01-23 20:40:14 +08:00
parent 93b00cfdcf
commit 1d3c46a2be
No known key found for this signature in database
GPG Key ID: 25AC0345B92902AF
1 changed files with 1 additions and 1 deletions

View File

@ -560,7 +560,7 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
}
}
});
if (selectType != 0 || type == TYPE_USERS || type == TYPE_BANNED || type == TYPE_KICKED) {
if (ChatObject.hasAdminRights(currentChat) && (selectType != 0 || type == TYPE_USERS || type == TYPE_BANNED || type == TYPE_KICKED)) {
searchListViewAdapter = new SearchAdapter(context);
ActionBarMenu menu = actionBar.createMenu();
searchItem = menu.addItem(search_button, R.drawable.ic_ab_search).setIsSearchField(true).setActionBarMenuItemSearchListener(new ActionBarMenuItem.ActionBarMenuItemSearchListener() {