Added extra notification settings

pull/215/head
M66B 5 months ago
parent 0bb3147e44
commit d89f8b8417

@ -229,7 +229,12 @@
android:launchMode="singleTask"
android:parentActivityName=".ActivityMain"
android:resizeableActivity="true"
android:taskAffinity="${applicationId}.SETUP" />
android:taskAffinity="${applicationId}.SETUP">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
</intent-filter>
</activity>
<activity
android:name=".ActivitySignature"

@ -236,7 +236,12 @@
android:launchMode="singleTask"
android:parentActivityName=".ActivityMain"
android:resizeableActivity="true"
android:taskAffinity="${applicationId}.SETUP" />
android:taskAffinity="${applicationId}.SETUP">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
</intent-filter>
</activity>
<activity
android:name=".ActivitySignature"

@ -235,7 +235,12 @@
android:launchMode="singleTask"
android:parentActivityName=".ActivityMain"
android:resizeableActivity="true"
android:taskAffinity="${applicationId}.SETUP" />
android:taskAffinity="${applicationId}.SETUP">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
</intent-filter>
</activity>
<activity
android:name=".ActivitySignature"

@ -235,7 +235,12 @@
android:launchMode="singleTask"
android:parentActivityName=".ActivityMain"
android:resizeableActivity="true"
android:taskAffinity="${applicationId}.SETUP" />
android:taskAffinity="${applicationId}.SETUP">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
</intent-filter>
</activity>
<activity
android:name=".ActivitySignature"

@ -231,7 +231,12 @@
android:launchMode="singleTask"
android:parentActivityName=".ActivityMain"
android:resizeableActivity="true"
android:taskAffinity="${applicationId}.SETUP" />
android:taskAffinity="${applicationId}.SETUP">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
</intent-filter>
</activity>
<activity
android:name=".ActivitySignature"

@ -19,8 +19,10 @@ package eu.faircode.email;
Copyright 2018-2024 by Marcel Bokhorst (M66B)
*/
import android.app.Notification;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.MatrixCursor;
@ -61,6 +63,7 @@ import com.google.android.material.tabs.TabLayout;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Set;
public class FragmentOptions extends FragmentBase {
private ViewPager pager;
@ -274,12 +277,21 @@ public class FragmentOptions extends FragmentBase {
.setText(title);
}
String tab = getActivity().getIntent().getStringExtra("tab");
if (!TextUtils.isEmpty(tab)) {
int index = TAB_LABELS.indexOf(tab);
if (index >= 0)
pager.setCurrentItem(index);
getActivity().getIntent().removeExtra("tab");
Intent intent = getActivity().getIntent();
if (intent != null) {
String tab;
Set<String> categories = intent.getCategories();
if (categories != null && categories.contains(Notification.INTENT_CATEGORY_NOTIFICATION_PREFERENCES))
tab = "notifications";
else
tab = getActivity().getIntent().getStringExtra("tab");
if (!TextUtils.isEmpty(tab)) {
int index = TAB_LABELS.indexOf(tab);
if (index >= 0)
pager.setCurrentItem(index);
getActivity().getIntent().removeExtra("tab");
}
}
}

@ -229,7 +229,12 @@
android:launchMode="singleTask"
android:parentActivityName=".ActivityMain"
android:resizeableActivity="true"
android:taskAffinity="${applicationId}.SETUP" />
android:taskAffinity="${applicationId}.SETUP">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
</intent-filter>
</activity>
<activity
android:name=".ActivitySignature"

Loading…
Cancel
Save