refactor: Rename clearWarningAction to clearContentFilter (#1125)
This commit is contained in:
parent
ac36ed6264
commit
79a69513ae
|
@ -356,7 +356,7 @@ class ConversationsFragment :
|
|||
viewModel.voteInPoll(choices, viewData.lastStatus.actionableId, poll.id)
|
||||
}
|
||||
|
||||
override fun clearWarningAction(pachliAccountId: Long, viewData: ConversationViewData) {
|
||||
override fun clearContentFilter(pachliAccountId: Long, viewData: ConversationViewData) {
|
||||
}
|
||||
|
||||
// Filters don't apply in conversations
|
||||
|
|
|
@ -632,7 +632,7 @@ class NotificationsFragment :
|
|||
onContentCollapsedChange(pachliAccountId, viewData, isCollapsed)
|
||||
}
|
||||
|
||||
override fun clearWarningAction(pachliAccountId: Long, viewData: NotificationViewData) {
|
||||
override fun clearContentFilter(pachliAccountId: Long, viewData: NotificationViewData) {
|
||||
adapter.snapshot().withIndex().filter { it.value?.statusViewData?.actionableId == viewData.statusViewData!!.actionableId }
|
||||
.map {
|
||||
it.value?.statusViewData = it.value?.statusViewData?.copy(
|
||||
|
|
|
@ -160,7 +160,7 @@ class SearchStatusesFragment : SearchFragment<StatusViewData>(), StatusActionLis
|
|||
viewModel.voteInPoll(viewData, poll, choices)
|
||||
}
|
||||
|
||||
override fun clearWarningAction(pachliAccountId: Long, viewData: StatusViewData) {}
|
||||
override fun clearContentFilter(pachliAccountId: Long, viewData: StatusViewData) {}
|
||||
|
||||
override fun onReblog(viewData: StatusViewData, reblog: Boolean) {
|
||||
viewModel.reblog(viewData, reblog)
|
||||
|
|
|
@ -650,7 +650,7 @@ class TimelineFragment :
|
|||
viewModel.accept(StatusAction.VoteInPoll(poll, choices, viewData))
|
||||
}
|
||||
|
||||
override fun clearWarningAction(pachliAccountId: Long, viewData: StatusViewData) {
|
||||
override fun clearContentFilter(pachliAccountId: Long, viewData: StatusViewData) {
|
||||
viewModel.clearWarning(pachliAccountId, viewData)
|
||||
}
|
||||
|
||||
|
|
|
@ -397,7 +397,7 @@ class ViewThreadFragment :
|
|||
}
|
||||
}
|
||||
|
||||
override fun clearWarningAction(pachliAccountId: Long, viewData: StatusViewData) {
|
||||
override fun clearContentFilter(pachliAccountId: Long, viewData: StatusViewData) {
|
||||
viewModel.clearWarning(viewData)
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ interface StatusActionListener<T : IStatusViewData> : LinkListener {
|
|||
fun onShowFavs(statusId: String) {}
|
||||
fun onVoteInPoll(viewData: T, poll: Poll, choices: List<Int>)
|
||||
fun onShowEdits(statusId: String) {}
|
||||
fun clearWarningAction(pachliAccountId: Long, viewData: T)
|
||||
fun clearContentFilter(pachliAccountId: Long, viewData: T)
|
||||
|
||||
/** Edit the filter that matched this status. */
|
||||
fun onEditFilterById(pachliAccountId: Long, filterId: String)
|
||||
|
|
|
@ -201,7 +201,7 @@ class ListStatusAccessibilityDelegate<T : IStatusViewData>(
|
|||
app.pachli.core.ui.R.id.action_more -> {
|
||||
statusActionListener.onMore(host, status)
|
||||
}
|
||||
app.pachli.core.ui.R.id.action_show_anyway -> statusActionListener.clearWarningAction(pachliAccountId, status)
|
||||
app.pachli.core.ui.R.id.action_show_anyway -> statusActionListener.clearContentFilter(pachliAccountId, status)
|
||||
app.pachli.core.ui.R.id.action_edit_filter -> {
|
||||
(recyclerView.findContainingViewHolder(host) as? FilterableStatusViewHolder<*>)?.matchedFilter?.let {
|
||||
statusActionListener.onEditFilterById(pachliAccountId, it.id)
|
||||
|
|
Loading…
Reference in New Issue