Add support for muting conversations (#1732)
* Add support for muting conversations Implements #1731 * Fix CI * Apply code review feedback
This commit is contained in:
parent
8e54e4ae16
commit
8cb83050ac
21 changed files with 904 additions and 19 deletions
|
|
@ -53,6 +53,7 @@ import com.keylesspalace.tusky.appstore.BookmarkEvent;
|
|||
import com.keylesspalace.tusky.appstore.DomainMuteEvent;
|
||||
import com.keylesspalace.tusky.appstore.EventHub;
|
||||
import com.keylesspalace.tusky.appstore.FavoriteEvent;
|
||||
import com.keylesspalace.tusky.appstore.MuteConversationEvent;
|
||||
import com.keylesspalace.tusky.appstore.MuteEvent;
|
||||
import com.keylesspalace.tusky.appstore.PreferenceChangedEvent;
|
||||
import com.keylesspalace.tusky.appstore.ReblogEvent;
|
||||
|
|
@ -503,6 +504,9 @@ public class TimelineFragment extends SFragment implements
|
|||
} else if (event instanceof BookmarkEvent) {
|
||||
BookmarkEvent bookmarkEvent = (BookmarkEvent) event;
|
||||
handleBookmarkEvent(bookmarkEvent);
|
||||
} else if (event instanceof MuteConversationEvent) {
|
||||
MuteConversationEvent muteEvent = (MuteConversationEvent) event;
|
||||
handleMuteConversationEvent(muteEvent);
|
||||
} else if (event instanceof UnfollowEvent) {
|
||||
if (kind == Kind.HOME) {
|
||||
String id = ((UnfollowEvent) event).getAccountId();
|
||||
|
|
@ -1313,6 +1317,10 @@ public class TimelineFragment extends SFragment implements
|
|||
setBookmarkForStatus(pos, status, bookmarkEvent.getBookmark());
|
||||
}
|
||||
|
||||
private void handleMuteConversationEvent(@NonNull MuteConversationEvent event) {
|
||||
fullyRefresh();
|
||||
}
|
||||
|
||||
private void handleStatusComposeEvent(@NonNull Status status) {
|
||||
switch (kind) {
|
||||
case HOME:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue