Added remark about separating notifications

This commit is contained in:
M66B 2021-08-13 10:21:05 +02:00
parent a24784a12b
commit 82d7f0bb37
3 changed files with 30 additions and 4 deletions

View File

@ -19,12 +19,15 @@ package eu.faircode.email;
Copyright 2018-2021 by Marcel Bokhorst (M66B)
*/
import static android.app.Activity.RESULT_OK;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.graphics.Paint;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Build;
@ -50,8 +53,6 @@ import androidx.constraintlayout.widget.Group;
import androidx.lifecycle.Lifecycle;
import androidx.preference.PreferenceManager;
import static android.app.Activity.RESULT_OK;
public class FragmentOptionsNotifications extends FragmentBase implements SharedPreferences.OnSharedPreferenceChangeListener {
private Button btnManage;
private Button btnManageDefault;
@ -59,6 +60,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
private Button btnManageService;
private ImageView ivChannelService;
private ImageButton ibWhy;
private FixedTextView tvNotifySeparate;
private SwitchCompat swNewestFirst;
private SwitchCompat swBackground;
@ -136,6 +138,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
btnManageService = view.findViewById(R.id.btnManageService);
ivChannelService = view.findViewById(R.id.ivChannelService);
ibWhy = view.findViewById(R.id.ibWhy);
tvNotifySeparate = view.findViewById(R.id.tvNotifySeparate);
swNewestFirst = view.findViewById(R.id.swNewestFirst);
swBackground = view.findViewById(R.id.swBackground);
@ -236,6 +239,14 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
}
});
tvNotifySeparate.setPaintFlags(tvNotifySeparate.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
tvNotifySeparate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Helper.viewFAQ(view.getContext(), 145);
}
});
swNewestFirst.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {

View File

@ -165,6 +165,20 @@
app:layout_constraintTop_toBottomOf="@+id/tvManageServiceHint"
app:srcCompat="@drawable/twotone_info_24" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvNotifySeparate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_open_in_new_12"
android:drawablePadding="6dp"
android:drawableTint="?android:attr/textColorLink"
android:text="@string/title_advanced_notify_separate_hint"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ibWhy" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swNewestFirst"
android:layout_width="0dp"
@ -173,7 +187,7 @@
android:text="@string/title_advanced_notifications_newest_first"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ibWhy"
app:layout_constraintTop_toBottomOf="@id/tvNotifySeparate"
app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat

View File

@ -704,6 +704,7 @@
<string name="title_advanced_notify_manage_hint">Tap on the channel name to set the channel properties</string>
<string name="title_advanced_notify_manage_default_hint">To set the default sound, etc</string>
<string name="title_advanced_notify_manage_service_hint">To disable the \'monitoring\' notification</string>
<string name="title_advanced_notify_separate_hint">How do I configure notifications for accounts, folders and senders?</string>
<string name="title_advanced_notify_preview_all_hint">For wearables that can show the full text (up to 5,000 characters)</string>
<string name="title_advanced_notify_preview_only_hint">This delays showing of notifications until the message text has been downloaded</string>
<string name="title_advanced_wearable_hint">Notifications are only sent to a wearable after the message text has been downloaded</string>
@ -992,7 +993,7 @@
<string name="title_save_eml">Save raw message file</string>
<string name="title_eml_remark">To forward messages, the raw (original) messages need to be downloaded from the server. This requires an internet connection.</string>
<string name="title_eml_option">This can prevented by enabling always downloading raw message files in the connection settings</string>
<string name="title_eml_option">This can be prevented by enabling always downloading raw message files in the connection settings</string>
<string name="title_eml_downloaded">Raw messages downloaded: %1$s</string>
<string name="title_buttons">Select buttons</string>