Add boost click handling
This commit is contained in:
parent
afa21f5a5c
commit
0f15509345
7 changed files with 39 additions and 6 deletions
|
|
@ -225,6 +225,12 @@ public class NotificationsFragment extends SFragment implements
|
|||
super.viewThread(notification.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOpenReblog(int position) {
|
||||
Notification notification = adapter.getItem(position);
|
||||
if (notification != null) onViewAccount(notification.account.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewTag(String tag) {
|
||||
super.viewTag(tag);
|
||||
|
|
|
|||
|
|
@ -169,6 +169,11 @@ public abstract class SFragment extends BaseFragment {
|
|||
callList.add(call);
|
||||
}
|
||||
|
||||
protected void openReblog(@Nullable final Status status) {
|
||||
if (status == null) return;
|
||||
viewAccount(status.account.id);
|
||||
}
|
||||
|
||||
private void mute(String id) {
|
||||
Call<Relationship> call = mastodonApi.muteAccount(id);
|
||||
call.enqueue(new Callback<Relationship>() {
|
||||
|
|
|
|||
|
|
@ -246,6 +246,11 @@ public class TimelineFragment extends SFragment implements
|
|||
super.more(adapter.getItem(position), view, adapter, position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOpenReblog(int position) {
|
||||
super.openReblog(adapter.getItem(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewMedia(String[] urls, int urlIndex, Status.MediaAttachment.Type type) {
|
||||
super.viewMedia(urls, urlIndex, type);
|
||||
|
|
|
|||
|
|
@ -158,6 +158,12 @@ public class ViewThreadFragment extends SFragment implements
|
|||
super.viewThread(status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOpenReblog(int position) {
|
||||
// there should be no reblogs in the thread but let's implement it to be sure
|
||||
super.openReblog(adapter.getItem(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewTag(String tag) {
|
||||
super.viewTag(tag);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue