Notification settings are pro features

pull/156/head 1.492
M66B 5 years ago
parent c07f72bd41
commit 976142178f

@ -43,8 +43,7 @@ This app starts a foreground service with a low priority status bar notification
* Account/identity colors
* Colored stars ([instructions](https://github.com/M66B/open-source-email/blob/master/FAQ.md#user-content-faq107))
* Notifications per account (requires Android 8 Oreo or later)
* Notification sound per sender (requires Android 8 Oreo or later)
* Notification settings (sounds) per account/folder/sender (requires Android 8 Oreo)
* Configurable notification actions
* Snooze messages ([instructions](https://github.com/M66B/open-source-email/blob/master/FAQ.md#user-content-faq67))
* Send messages after selected time

@ -642,6 +642,12 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
}
private void onActionCreateChannel() {
if (!Helper.isPro(context)) {
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
lbm.sendBroadcast(new Intent(ActivityView.ACTION_SHOW_PRO));
return;
}
folder.createNotificationChannel(context);
onActionEditChannel();
}

@ -1249,6 +1249,12 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
@TargetApi(Build.VERSION_CODES.O)
private void onActionCreateChannel() {
if (!Helper.isPro(context)) {
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
lbm.sendBroadcast(new Intent(ActivityView.ACTION_SHOW_PRO));
return;
}
NotificationChannel channel = new NotificationChannel(
channelId, from.getAddress(),
NotificationManager.IMPORTANCE_HIGH);

Loading…
Cancel
Save