2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 23:45:44 +00:00

Improve suggest export logic.

This commit is contained in:
John Preston
2018-06-28 18:44:07 +01:00
parent d0614efd65
commit e21c354428
4 changed files with 17 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/view/history_view_element.h"
#include "inline_bots/inline_bot_layout_item.h"
#include "storage/localstorage.h"
#include "boxes/abstract_box.h"
#include "data/data_media_types.h"
#include "data/data_feed.h"
#include "data/data_photo.h"
@@ -93,6 +94,13 @@ void Session::suggestStartExport(TimeId availableAt) {
suggestStartExport();
}
void Session::clearExportSuggestion() {
_exportAvailableAt = 0;
if (_exportSuggestion) {
_exportSuggestion->closeBox();
}
}
void Session::suggestStartExport() {
if (_exportAvailableAt <= 0) {
return;
@@ -110,7 +118,7 @@ void Session::suggestStartExport() {
} else if (_export) {
Export::View::ClearSuggestStart();
} else {
Export::View::SuggestStart();
_exportSuggestion = Export::View::SuggestStart();
}
}