Fix always show pinned

This commit is contained in:
世界 2020-06-08 17:29:10 +08:00
parent 3cffc66352
commit f379ab30e3
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
1 changed files with 6 additions and 1 deletions

View File

@ -13495,9 +13495,14 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
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);