Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix threaded mode continuesly editing same toot #2430

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Reset advanced options when editing toots
There was both an issue with threaded mode and local-only toots when editing.
When activating either option, it was preserved on edit, but changing the local-only attribute is not supported and threaded mode got stuck editing the same toot.

The local-only option will be set to the toots local-only attribute to reflect that it is a local-only toot in the compose form. This unfortunately adds an additional local-only emoji.

Signed-off-by: Plastikmensch <plastikmensch@users.noreply.github.com>
  • Loading branch information
Plastikmensch committed Oct 31, 2023
commit 954f12591819ac5aa8bd67967fd230c632bbe99d
5 changes: 5 additions & 0 deletions app/javascript/flavours/glitch/reducers/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,11 @@ export default function compose(state = initialState, action) {
map.set('spoiler_text', '');
}

map.update(
'advanced_options',
map => map.merge(new ImmutableMap({ do_not_federate: action.status.get('local_only'), threaded_mode: false })),
);

if (action.status.get('poll')) {
map.set('poll', ImmutableMap({
options: action.status.getIn(['poll', 'options']).map(x => x.get('title')),
Expand Down