mirror of
https://gitlab.com/xynngh/YetAnotherCallBlocker.git
synced 2025-02-18 12:50:36 +01:00
Improve navigation
Thanks to an anonymous contributor
This commit is contained in:
parent
e41b76a16d
commit
f9430571d4
@ -44,6 +44,7 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".BlacklistActivity"
|
android:name=".BlacklistActivity"
|
||||||
android:label="@string/title_blacklist_activity"
|
android:label="@string/title_blacklist_activity"
|
||||||
|
android:launchMode="singleTop"
|
||||||
android:parentActivityName=".MainActivity">
|
android:parentActivityName=".MainActivity">
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.support.PARENT_ACTIVITY"
|
android:name="android.support.PARENT_ACTIVITY"
|
||||||
|
@ -18,8 +18,6 @@ import dummydomain.yetanothercallblocker.data.YacbHolder;
|
|||||||
import dummydomain.yetanothercallblocker.sia.model.NumberCategory;
|
import dummydomain.yetanothercallblocker.sia.model.NumberCategory;
|
||||||
import dummydomain.yetanothercallblocker.sia.model.database.FeaturedDatabaseItem;
|
import dummydomain.yetanothercallblocker.sia.model.database.FeaturedDatabaseItem;
|
||||||
|
|
||||||
import static dummydomain.yetanothercallblocker.IntentHelper.clearTop;
|
|
||||||
|
|
||||||
public class InfoDialogHelper {
|
public class InfoDialogHelper {
|
||||||
|
|
||||||
public static void showDialog(Context context, NumberInfo numberInfo,
|
public static void showDialog(Context context, NumberInfo numberInfo,
|
||||||
@ -84,10 +82,7 @@ public class InfoDialogHelper {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Runnable reviewsAction = () -> {
|
Runnable reviewsAction = () -> ReviewsActivity.startForNumber(context, numberInfo.number);
|
||||||
context.startActivity(clearTop(
|
|
||||||
ReviewsActivity.getNumberIntent(context, numberInfo.number)));
|
|
||||||
};
|
|
||||||
|
|
||||||
Runnable webReviewAction = () -> {
|
Runnable webReviewAction = () -> {
|
||||||
Uri uri = Uri.parse(YacbHolder.getWebService().getWebReviewsUrlPart()
|
Uri uri = Uri.parse(YacbHolder.getWebService().getWebReviewsUrlPart()
|
||||||
|
@ -21,6 +21,8 @@ import java.util.List;
|
|||||||
import dummydomain.yetanothercallblocker.data.YacbHolder;
|
import dummydomain.yetanothercallblocker.data.YacbHolder;
|
||||||
import dummydomain.yetanothercallblocker.sia.model.CommunityReview;
|
import dummydomain.yetanothercallblocker.sia.model.CommunityReview;
|
||||||
|
|
||||||
|
import static dummydomain.yetanothercallblocker.IntentHelper.clearTop;
|
||||||
|
|
||||||
public class ReviewsActivity extends AppCompatActivity {
|
public class ReviewsActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private static final String PARAM_NUMBER = "param_number";
|
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) {
|
public static void startForNumber(Context context, String number) {
|
||||||
context.startActivity(getNumberIntent(context, number));
|
context.startActivity(clearTop(getNumberIntent(context, number)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user