|
|
|
@ -88,7 +88,7 @@ public abstract class SFragment extends BaseFragment implements Injectable { |
|
|
|
|
protected abstract void removeItem(int position); |
|
|
|
|
|
|
|
|
|
protected abstract void onReblog(final boolean reblog, final int position); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private BottomSheetActivity bottomSheetActivity; |
|
|
|
|
|
|
|
|
|
private static List<Filter> filters; |
|
|
|
@ -137,6 +137,10 @@ public abstract class SFragment extends BaseFragment implements Injectable { |
|
|
|
|
public void onViewUrl(String url) { |
|
|
|
|
bottomSheetActivity.viewUrl(url, PostLookupFallbackBehavior.OPEN_IN_BROWSER); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void onShowReplyTo(String replyToId) { |
|
|
|
|
bottomSheetActivity.viewThread(replyToId, null); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void reply(Status status) { |
|
|
|
|
String inReplyToId = status.getActionableId(); |
|
|
|
@ -227,6 +231,12 @@ public abstract class SFragment extends BaseFragment implements Injectable { |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
openAsItem.setTitle(openAsTitle); |
|
|
|
|
|
|
|
|
|
if(status.getInReplyToId() == null) { |
|
|
|
|
MenuItem replyToItem = menu.findItem(R.id.status_reply_to); |
|
|
|
|
|
|
|
|
|
replyToItem.setVisible(false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
popup.setOnMenuItemClickListener(item -> { |
|
|
|
|
switch (item.getItemId()) { |
|
|
|
@ -260,6 +270,10 @@ public abstract class SFragment extends BaseFragment implements Injectable { |
|
|
|
|
clipboard.setPrimaryClip(clip); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
case R.id.status_reply_to: { |
|
|
|
|
onShowReplyTo(status.getInReplyToId()); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
case R.id.status_open_as: { |
|
|
|
|
showOpenAsDialog(statusUrl, item.getTitle()); |
|
|
|
|
return true; |
|
|
|
|