diff --git a/.github/workflows/rebase-needed.yml b/.github/workflows/rebase-needed.yml index 295039c41..06d835c09 100644 --- a/.github/workflows/rebase-needed.yml +++ b/.github/workflows/rebase-needed.yml @@ -23,5 +23,5 @@ jobs: repoToken: '${{ secrets.GITHUB_TOKEN }}' commentOnClean: This pull request has resolved merge conflicts and is ready for review. commentOnDirty: This pull request has merge conflicts that must be resolved before it can be merged. - retryMax: 10 + retryMax: 30 continueOnMissingPermissions: false diff --git a/.haml-lint_todo.yml b/.haml-lint_todo.yml index 31b79f7db..94aeadfff 100644 --- a/.haml-lint_todo.yml +++ b/.haml-lint_todo.yml @@ -1,17 +1,13 @@ # This configuration was generated by # `haml-lint --auto-gen-config` -# on 2023-07-11 23:58:05 +0200 using Haml-Lint version 0.48.0. +# on 2023-07-17 12:00:21 -0400 using Haml-Lint version 0.48.0. # The point is for the user to remove these configuration records # one by one as the lints are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of Haml-Lint, may require this file to be generated again. linters: - # Offense count: 94 - RuboCop: - enabled: false - - # Offense count: 960 + # Offense count: 959 LineLength: enabled: false @@ -19,6 +15,10 @@ linters: UnnecessaryStringOutput: enabled: false + # Offense count: 67 + RuboCop: + enabled: false + # Offense count: 3 ViewLength: exclude: diff --git a/app/controllers/api/v1/tags_controller.rb b/app/controllers/api/v1/tags_controller.rb index 284ec8593..672535a01 100644 --- a/app/controllers/api/v1/tags_controller.rb +++ b/app/controllers/api/v1/tags_controller.rb @@ -19,6 +19,7 @@ class Api::V1::TagsController < Api::BaseController def unfollow TagFollow.find_by(account: current_account, tag: @tag)&.destroy! + TagUnmergeWorker.perform_async(@tag.id, current_account.id) render json: @tag, serializer: REST::TagSerializer end diff --git a/app/javascript/mastodon/components/column_back_button.jsx b/app/javascript/mastodon/components/column_back_button.jsx index 38ffa607a..74a03b093 100644 --- a/app/javascript/mastodon/components/column_back_button.jsx +++ b/app/javascript/mastodon/components/column_back_button.jsx @@ -23,9 +23,7 @@ export default class ColumnBackButton extends PureComponent { if (onClick) { onClick(); - // Check if there is a previous page in the app to go back to per https://stackoverflow.com/a/70532858/9703201 - // When upgrading to V6, check `location.key !== 'default'` instead per https://github.com/remix-run/history/blob/main/docs/api-reference.md#location - } else if (router.route.location.key) { + } else if (router.history.location?.state?.fromMastodon) { router.history.goBack(); } else { router.history.push('/'); diff --git a/app/javascript/mastodon/components/column_header.jsx b/app/javascript/mastodon/components/column_header.jsx index 89eade262..9d29bbae0 100644 --- a/app/javascript/mastodon/components/column_header.jsx +++ b/app/javascript/mastodon/components/column_header.jsx @@ -63,10 +63,12 @@ class ColumnHeader extends PureComponent { }; handleBackClick = () => { - if (window.history && window.history.state) { - this.context.router.history.goBack(); + const { router } = this.context; + + if (router.history.location?.state?.fromMastodon) { + router.history.goBack(); } else { - this.context.router.history.push('/'); + router.history.push('/'); } }; @@ -83,6 +85,7 @@ class ColumnHeader extends PureComponent { }; render () { + const { router } = this.context; const { title, icon, active, children, pinned, multiColumn, extraButton, showBackButton, intl: { formatMessage }, placeholder, appendContent, collapseIssues } = this.props; const { collapsed, animating } = this.state; @@ -126,7 +129,7 @@ class ColumnHeader extends PureComponent { pinButton = ; } - if (!pinned && (multiColumn || showBackButton)) { + if (!pinned && ((multiColumn && router.history.location?.state?.fromMastodon) || showBackButton)) { backButton = (