Skip to content

Commit

Permalink
Update warn button listener
Browse files Browse the repository at this point in the history
  • Loading branch information
cooltey committed Oct 23, 2023
1 parent 50df663 commit e41305c
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,6 @@ class ArticleEditDetailsFragment : Fragment(), WatchlistExpiryDialog.Callback, L
editHistoryInteractionEvent?.logThankTry()
}

binding.warnButton.setOnClickListener {
viewModel.revisionTo?.let { revision ->
val pageTitle = PageTitle(UserTalkAliasData.valueFor(viewModel.pageTitle.wikiSite.languageCode), revision.user, viewModel.pageTitle.wikiSite)
requestWarn.launch(TalkReplyActivity.newIntent(requireContext(), pageTitle, null, null, invokeSource = InvokeSource.DIFF_ACTIVITY, fromDiff = true))
}
}

binding.undoButton.setOnClickListener {
val canUndo = viewModel.revisionFrom != null && AccountUtil.isLoggedIn
val canRollback = AccountUtil.isLoggedIn && viewModel.hasRollbackRights && !viewModel.canGoForward
Expand Down Expand Up @@ -333,7 +326,10 @@ class ArticleEditDetailsFragment : Fragment(), WatchlistExpiryDialog.Callback, L
updateWatchButton(isWatched, hasWatchlistExpiry)

binding.warnButton.setOnClickListener {
// TODO: implement this
viewModel.revisionTo?.let { revision ->
val pageTitle = PageTitle(UserTalkAliasData.valueFor(viewModel.pageTitle.wikiSite.languageCode), revision.user, viewModel.pageTitle.wikiSite)
requestWarn.launch(TalkReplyActivity.newIntent(requireContext(), pageTitle, null, null, invokeSource = InvokeSource.DIFF_ACTIVITY, fromDiff = true))
}
}

binding.errorView.backClickListener = View.OnClickListener { requireActivity().finish() }
Expand Down

0 comments on commit e41305c

Please sign in to comment.