Improve navigation

Thanks to an anonymous contributor
This commit is contained in:
xynngh 2020-09-05 19:37:54 +04:00
parent e41b76a16d
commit f9430571d4
3 changed files with 5 additions and 7 deletions

View File

@ -44,6 +44,7 @@
<activity
android:name=".BlacklistActivity"
android:label="@string/title_blacklist_activity"
android:launchMode="singleTop"
android:parentActivityName=".MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"

View File

@ -18,8 +18,6 @@ import dummydomain.yetanothercallblocker.data.YacbHolder;
import dummydomain.yetanothercallblocker.sia.model.NumberCategory;
import dummydomain.yetanothercallblocker.sia.model.database.FeaturedDatabaseItem;
import static dummydomain.yetanothercallblocker.IntentHelper.clearTop;
public class InfoDialogHelper {
public static void showDialog(Context context, NumberInfo numberInfo,
@ -84,10 +82,7 @@ public class InfoDialogHelper {
return;
}
Runnable reviewsAction = () -> {
context.startActivity(clearTop(
ReviewsActivity.getNumberIntent(context, numberInfo.number)));
};
Runnable reviewsAction = () -> ReviewsActivity.startForNumber(context, numberInfo.number);
Runnable webReviewAction = () -> {
Uri uri = Uri.parse(YacbHolder.getWebService().getWebReviewsUrlPart()

View File

@ -21,6 +21,8 @@ import java.util.List;
import dummydomain.yetanothercallblocker.data.YacbHolder;
import dummydomain.yetanothercallblocker.sia.model.CommunityReview;
import static dummydomain.yetanothercallblocker.IntentHelper.clearTop;
public class ReviewsActivity extends AppCompatActivity {
private static final String PARAM_NUMBER = "param_number";
@ -38,7 +40,7 @@ public class ReviewsActivity extends AppCompatActivity {
}
public static void startForNumber(Context context, String number) {
context.startActivity(getNumberIntent(context, number));
context.startActivity(clearTop(getNumberIntent(context, number)));
}
@Override