Implement timed mutes. (#2035)

Fixes #2033
This commit is contained in:
Levi Bard 2021-01-15 21:05:36 +01:00 committed by GitHub
commit be60155de5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 303 additions and 260 deletions

View file

@ -193,8 +193,8 @@ class SearchViewModel @Inject constructor(
return accountManager.getAllAccountsOrderedByActive()
}
fun muteAccount(accountId: String, notifications: Boolean) {
timelineCases.mute(accountId, notifications)
fun muteAccount(accountId: String, notifications: Boolean, duration: Int) {
timelineCases.mute(accountId, notifications, duration)
}
fun pinAccount(status: Status, isPin: Boolean) {

View file

@ -377,8 +377,8 @@ class SearchStatusesFragment : SearchFragment<Pair<Status, StatusViewData.Concre
showMuteAccountDialog(
this.requireActivity(),
accountUsername
) { notifications ->
viewModel.muteAccount(accountId, notifications)
) { notifications, duration ->
viewModel.muteAccount(accountId, notifications, duration)
}
}