ViewThreadActivity: move Open in web menu option to status threedots menu

main
Alibek Omarov 4 years ago
parent 0ba08afd85
commit b7892dc781
  1. 4
      app/src/main/java/com/keylesspalace/tusky/ViewThreadActivity.java
  2. 5
      app/src/main/java/com/keylesspalace/tusky/components/search/fragments/SearchStatusesFragment.kt
  3. 5
      app/src/main/java/com/keylesspalace/tusky/fragment/SFragment.java
  4. 3
      app/src/main/res/menu/status_more.xml
  5. 3
      app/src/main/res/menu/status_more_for_user.xml
  6. 4
      app/src/main/res/menu/view_thread_toolbar.xml

@ -114,10 +114,6 @@ public class ViewThreadActivity extends BottomSheetActivity implements HasAndroi
onBackPressed();
return true;
}
case R.id.action_open_in_web: {
LinkHelper.openLink(getIntent().getStringExtra(URL_EXTRA), this);
return true;
}
case R.id.action_reveal: {
fragment.onRevealPressed();
return true;

@ -53,6 +53,7 @@ import com.keylesspalace.tusky.entity.Status.Mention
import com.keylesspalace.tusky.interfaces.AccountSelectionListener
import com.keylesspalace.tusky.interfaces.StatusActionListener
import com.keylesspalace.tusky.util.CardViewMode
import com.keylesspalace.tusky.util.LinkHelper
import com.keylesspalace.tusky.util.NetworkState
import com.keylesspalace.tusky.util.StatusDisplayOptions
import com.keylesspalace.tusky.viewdata.AttachmentViewData
@ -296,6 +297,10 @@ class SearchStatusesFragment : SearchFragment<Pair<Status, StatusViewData.Concre
clipboard.setPrimaryClip(ClipData.newPlainText(null, statusUrl))
return@setOnMenuItemClickListener true
}
R.id.status_open_in_web -> {
LinkHelper.openLinkInBrowser(Uri.parse(statusUrl), context);
return@setOnMenuItemClickListener true
}
R.id.status_open_as -> {
showOpenAsDialog(statusUrl!!, item.title)
return@setOnMenuItemClickListener true

@ -62,6 +62,7 @@ import com.keylesspalace.tusky.entity.Status;
import com.keylesspalace.tusky.entity.EmojiReaction;
import com.keylesspalace.tusky.network.MastodonApi;
import com.keylesspalace.tusky.network.TimelineCases;
import com.keylesspalace.tusky.util.LinkHelper;
import com.keylesspalace.tusky.viewdata.AttachmentViewData;
import com.keylesspalace.tusky.interfaces.StatusActionListener;
@ -320,6 +321,10 @@ public abstract class SFragment extends BaseFragment implements Injectable {
clipboard.setPrimaryClip(clip);
return true;
}
case R.id.status_open_in_web: {
LinkHelper.openLinkInBrowser(Uri.parse(statusUrl), getContext());
return true;
}
case R.id.status_reply_to: {
onShowReplyTo(status.getInReplyToId());
return true;

@ -18,6 +18,9 @@
<item
android:id="@+id/status_copy_link"
android:title="@string/action_copy_link" />
<item
android:id="@+id/status_open_in_web"
android:title="@string/action_open_in_web" />
<item
android:id="@+id/status_open_as"
android:title="@string/action_open_as" />

@ -21,6 +21,9 @@
<item
android:id="@+id/status_open_as"
android:title="@string/action_open_as" />
<item
android:id="@+id/status_open_in_web"
android:title="@string/action_open_in_web" />
<item
android:id="@+id/status_mute_conversation"
android:title="@string/action_mute_conversation"

@ -3,10 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_open_in_web"
android:title="@string/action_open_in_web"
app:showAsAction="never" />
<item
android:id="@+id/action_reveal"
android:title="@string/expand_collapse_all_statuses"

Loading…
Cancel
Save