Flip notification title and text

pull/253/head
Alex Baker 9 years ago
parent 3189182a93
commit 885b0faba5

@ -27,8 +27,8 @@ android {
buildToolsVersion "22"
defaultConfig {
versionCode 348
versionName "4.7.7"
versionCode 349
versionName "4.7.8"
minSdkVersion 7
targetSdkVersion 22
}

@ -39,7 +39,7 @@ public class NotificationFragment extends TaskListFragment {
}
private void displayNotificationPopup() {
final String title = extras.getString(Notifications.EXTRAS_TEXT);
final String title = extras.getString(Notifications.EXTRAS_TITLE);
final long taskId = extras.getLong(TOKEN_ID);
final AstridActivity activity = (AstridActivity) getActivity();

@ -126,13 +126,13 @@ public class Notifications extends InjectingBroadcastReceiver {
task.setReminderLast(DateUtilities.now());
taskDao.saveExisting(task);
String title = context.getString(R.string.app_name);
String text = context.getString(R.string.app_name);
Intent intent = atLeastJellybean()
? createEditIntent(id, task)
: createNotificationIntent(id, taskTitle);
broadcaster.requestNotification((int) id, intent, type, title, taskTitle, ringTimes);
broadcaster.requestNotification((int) id, intent, type, taskTitle, text, ringTimes);
return true;
}
@ -143,7 +143,7 @@ public class Notifications extends InjectingBroadcastReceiver {
null);
Bundle customExtras = new Bundle();
customExtras.putLong(NotificationFragment.TOKEN_ID, id);
customExtras.putString(EXTRAS_TEXT, taskTitle);
customExtras.putString(EXTRAS_TITLE, taskTitle);
itemFilter.customExtras = customExtras;
itemFilter.customTaskList = new ComponentName(context, NotificationFragment.class);
@ -151,7 +151,7 @@ public class Notifications extends InjectingBroadcastReceiver {
setAction("NOTIFY" + id); //$NON-NLS-1$
putExtra(TaskListFragment.TOKEN_FILTER, itemFilter);
putExtra(NotificationFragment.TOKEN_ID, id);
putExtra(EXTRAS_TEXT, taskTitle);
putExtra(EXTRAS_TITLE, taskTitle);
setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
}};
}

@ -119,7 +119,7 @@ public class ShowNotificationReceiver extends InjectingBroadcastReceiver {
NotificationCompat.Builder builder = new NotificationCompat.Builder(context)
.setSmallIcon(R.drawable.notif_astrid)
.setTicker(text)
.setTicker(title)
.setWhen(System.currentTimeMillis())
.setContentTitle(title)
.setContentText(text)
@ -219,7 +219,7 @@ public class ShowNotificationReceiver extends InjectingBroadcastReceiver {
}
singleThreadVoicePool.submit(new NotificationRunnable(ringTimes, notificationId, notification, voiceReminder,
maxOutVolumeForMultipleRingReminders, audioManager, previousAlarmVolume, text,
maxOutVolumeForMultipleRingReminders, audioManager, previousAlarmVolume, title,
notificationManager, voiceOutputAssistant));
}

Loading…
Cancel
Save