mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
feat: rework disableStories
This commit is contained in:
@@ -558,11 +558,13 @@ void Widget::chosenRow(const ChosenRow &row) {
|
||||
}
|
||||
return;
|
||||
} else if (history) {
|
||||
const auto settings = &AyuSettings::getInstance();
|
||||
const auto peer = history->peer;
|
||||
if (row.message.fullId.msg == ShowAtUnreadMsgId) {
|
||||
if (row.userpicClick
|
||||
&& peer->hasActiveStories()
|
||||
&& !peer->isSelf()) {
|
||||
&& !peer->isSelf()
|
||||
&& !settings->disableStories) {
|
||||
controller()->openPeerStories(peer->id);
|
||||
return;
|
||||
}
|
||||
@@ -1519,6 +1521,13 @@ void Widget::updateStoriesVisibility() {
|
||||
if (!_stories) {
|
||||
return;
|
||||
}
|
||||
|
||||
const auto settings = &AyuSettings::getInstance();
|
||||
if (settings->disableStories) {
|
||||
_stories->setVisible(false);
|
||||
return;
|
||||
}
|
||||
|
||||
const auto hidden = (_showAnimation != nullptr)
|
||||
|| _openedForum
|
||||
|| !_widthAnimationCache.isNull()
|
||||
|
||||
Reference in New Issue
Block a user