diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index 3cfc98e26a..fe1121fc5a 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -27191,7 +27191,7 @@ private void updatePinnedMessageView(boolean animated, int animateToNext) { SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount); if ((threadMessageObject == null || isTopic) && (chatInfo == null && userInfo == null || pinned_msg_id == 0 || !pinnedMessageIds.isEmpty() && pinnedMessageIds.get(0) == preferences.getInt("pin_" + dialog_id, 0)) || isReport() || actionBar != null && (actionBar.isActionModeShowed() || actionBar.isSearchFieldVisible())) { changed = hidePinnedMessageView(animated); - if (headerItem != null) headerItem.hideSubItem(nkheaderbtn_show_pinned); + if (headerItem != null) headerItem.showSubItem(nkheaderbtn_show_pinned); } else if (pinned_msg_id == preferences.getInt("pin_" + dialog_id, 0)) { changed = hidePinnedMessageView(animated); if (headerItem != null) headerItem.showSubItem(nkheaderbtn_show_pinned); @@ -42128,7 +42128,7 @@ private void nkbtn_onclick_actionbar(int id) { selectAndShareMyKey(new Intent()); } else if (id == nkheaderbtn_show_pinned) { SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount); - preferences.edit().putInt("pin_" + dialog_id, 0).apply(); + preferences.edit().remove("pin_" + dialog_id).apply(); updatePinnedMessageView(true); } else if (id == nkheaderbtn_linked_chat) { if (chatInfo == null) {