diff --git a/Telegram/SourceFiles/dialogs/dialogs_layout.cpp b/Telegram/SourceFiles/dialogs/dialogs_layout.cpp
index 8d17dabcd..a631209cc 100644
--- a/Telegram/SourceFiles/dialogs/dialogs_layout.cpp
+++ b/Telegram/SourceFiles/dialogs/dialogs_layout.cpp
@@ -107,7 +107,7 @@ void paintRow(Painter &p, History *history, HistoryItem *item, HistoryDraft *dra
 		} else {
 			history->typingText.drawElided(p, nameleft, texttop, namewidth);
 		}
-	} else {
+	} else if (!item->isEmpty()) {
 		paintRowDate(p, item->date, rectForName, active);
 
 		// draw check
diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp
index 18f0bf8b9..c261270ce 100644
--- a/Telegram/SourceFiles/history.cpp
+++ b/Telegram/SourceFiles/history.cpp
@@ -2838,6 +2838,15 @@ void HistoryItem::clipCallback(ClipReaderNotification notification) {
 	}
 }
 
+bool HistoryItem::displayDate() const {
+	if (isEmpty()) return false;
+
+	if (auto prev = previous()) {
+		return prev->isEmpty() || (prev->date.date() != date.date());
+	}
+	return true;
+}
+
 HistoryItem::~HistoryItem() {
 	App::historyUnregItem(this);
 	if (id < 0 && App::uploader()) {
diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h
index 86e8bd22f..c32b4ff1c 100644
--- a/Telegram/SourceFiles/history.h
+++ b/Telegram/SourceFiles/history.h
@@ -1488,12 +1488,7 @@ protected:
 	// this should be used only in previousItemChanged()
 	// to add required bits to the Composer mask
 	// after that always use Has<HistoryMessageDate>()
-	bool displayDate() const {
-		if (auto prev = previous()) {
-			return prev->date.date() != date.date();
-		}
-		return true;
-	}
+	bool displayDate() const;
 
 	// this should be used only in previousItemChanged() or when
 	// HistoryMessageDate or HistoryMessageUnreadBar bit is changed in the Composer mask
diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp
index aa1c15cff..ef287e601 100644
--- a/Telegram/SourceFiles/mainwidget.cpp
+++ b/Telegram/SourceFiles/mainwidget.cpp
@@ -821,7 +821,6 @@ void MainWidget::clearHistory(PeerData *peer) {
 		h->clear();
 		h->newLoaded = h->oldLoaded = true;
 	}
-	Ui::showPeerHistory(peer->id, ShowAtUnreadMsgId);
 	MTPmessages_DeleteHistory::Flags flags = MTPmessages_DeleteHistory::Flag::f_just_clear;
 	DeleteHistoryRequest request = { peer, true };
 	MTP::send(MTPmessages_DeleteHistory(MTP_flags(flags), peer->input, MTP_int(0)), rpcDone(&MainWidget::deleteHistoryPart, request));
diff --git a/Telegram/SourceFiles/profile/profile_actions_widget.cpp b/Telegram/SourceFiles/profile/profile_actions_widget.cpp
index 079969b48..3527f95e2 100644
--- a/Telegram/SourceFiles/profile/profile_actions_widget.cpp
+++ b/Telegram/SourceFiles/profile/profile_actions_widget.cpp
@@ -280,6 +280,7 @@ void ActionsWidget::onClearHistory() {
 void ActionsWidget::onClearHistorySure() {
 	Ui::hideLayer();
 	App::main()->clearHistory(peer());
+	Ui::showPeerHistory(peer(), ShowAtUnreadMsgId);
 }
 
 void ActionsWidget::onDeleteConversation() {