mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-06 11:52:58 +00:00
Disabled rich editor in stories reply composer.
This commit is contained in:
@@ -31,6 +31,7 @@ struct ComposeFeatures {
|
||||
bool editMessageStars : 1 = false;
|
||||
bool emojiOnlyPanel : 1 = false;
|
||||
bool videoStream : 1 = false;
|
||||
bool richEditor : 1 = true;
|
||||
};
|
||||
|
||||
} // namespace ChatHelpers
|
||||
|
||||
@@ -1384,6 +1384,14 @@ void ComposeControls::updateFeatures(ChatHelpers::ComposeFeatures features) {
|
||||
if (was.emojiOnlyPanel != features.emojiOnlyPanel) {
|
||||
initFieldAutocomplete();
|
||||
}
|
||||
if (was.richEditor != features.richEditor) {
|
||||
untrackThreadFieldVisibility();
|
||||
unregisterDraftSources();
|
||||
trackThreadFieldVisibility();
|
||||
registerDraftSource();
|
||||
updateExpandButtonVisibility();
|
||||
changed = true;
|
||||
}
|
||||
if (changed) {
|
||||
updateControlsGeometry(_wrap->size());
|
||||
}
|
||||
@@ -2119,7 +2127,8 @@ bool ComposeControls::isComposeBoxOpen() const {
|
||||
}
|
||||
|
||||
bool ComposeControls::hasRichDraftThreadScope() const {
|
||||
return draftKey(DraftType::Normal).isLocal();
|
||||
return _features.richEditor
|
||||
&& draftKey(DraftType::Normal).isLocal();
|
||||
}
|
||||
|
||||
bool ComposeControls::hasEditDraft() const {
|
||||
|
||||
@@ -130,6 +130,7 @@ namespace {
|
||||
.recordMediaMessage = !videoStream,
|
||||
.editMessageStars = videoStream,
|
||||
.emojiOnlyPanel = videoStream,
|
||||
.richEditor = false,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user