Skip to content

Commit

Permalink
Show pinned menu only when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
NekoInverter authored and NekoInverter committed Jun 8, 2020
1 parent 1e7c67f commit c0a1b71
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13420,9 +13420,14 @@ private void updatePinnedMessageView(boolean animated) {
pinned_msg_id = 0;
}
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
if (chatInfo == null && userInfo == null || pinned_msg_id == 0 || pinned_msg_id == preferences.getInt("pin_" + dialog_id, 0) || actionBar != null && (actionBar.isActionModeShowed() || actionBar.isSearchFieldVisible())) {
if (chatInfo == null && userInfo == null || pinned_msg_id == 0 || actionBar != null && (actionBar.isActionModeShowed() || actionBar.isSearchFieldVisible())) {
changed = hidePinnedMessageView(animated);
headerItem.hideSubItem(show_pinned);
} else if (pinned_msg_id == preferences.getInt("pin_" + dialog_id, 0)) {
changed = hidePinnedMessageView(animated);
headerItem.showSubItem(show_pinned);
} else {
headerItem.hideSubItem(show_pinned);
if (pinnedMessageObject != null) {
if (pinnedMessageView.getTag() != null) {
pinnedMessageView.setTag(null);
Expand Down

0 comments on commit c0a1b71

Please sign in to comment.