mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 15:04:57 +00:00
Save last opened subsection within a launch.
This commit is contained in:
@@ -7,9 +7,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#include "data/data_thread.h"
|
||||
|
||||
#include "data/data_forum.h"
|
||||
#include "data/data_forum_topic.h"
|
||||
#include "data/data_changes.h"
|
||||
#include "data/data_channel.h"
|
||||
#include "data/data_peer.h"
|
||||
#include "data/data_saved_messages.h"
|
||||
#include "data/data_saved_sublist.h"
|
||||
#include "history/history.h"
|
||||
#include "history/history_item.h"
|
||||
@@ -202,4 +205,16 @@ void Thread::setHasPinnedMessages(bool has) {
|
||||
EntryUpdate::Flag::HasPinnedMessages);
|
||||
}
|
||||
|
||||
void Thread::saveMeAsActiveSubsectionThread() {
|
||||
if (const auto channel = owningHistory()->peer->asChannel()) {
|
||||
if (channel->useSubsectionTabs()) {
|
||||
if (const auto forum = channel->forum()) {
|
||||
forum->saveActiveSubsectionThread(this);
|
||||
} else if (const auto monoforum = channel->monoforum()) {
|
||||
monoforum->saveActiveSubsectionThread(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Data
|
||||
|
||||
Reference in New Issue
Block a user