mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-08 01:58:52 -06:00
Fix crash on startup and after dismissing notification
This commit is contained in:
@@ -65,8 +65,11 @@ public class ReminderReceiver extends BroadcastReceiver
|
|||||||
|
|
||||||
Log.i(TAG, String.format("Received intent: %s", intent.toString()));
|
Log.i(TAG, String.format("Received intent: %s", intent.toString()));
|
||||||
|
|
||||||
|
Habit habit = null;
|
||||||
long today = DateUtils.getStartOfToday();
|
long today = DateUtils.getStartOfToday();
|
||||||
final Habit habit = habits.getById(parseId(intent.getData()));
|
|
||||||
|
if (intent.getData() != null)
|
||||||
|
habit = habits.getById(parseId(intent.getData()));
|
||||||
final Long timestamp = intent.getLongExtra("timestamp", today);
|
final Long timestamp = intent.getLongExtra("timestamp", today);
|
||||||
final Long reminderTime = intent.getLongExtra("reminderTime", today);
|
final Long reminderTime = intent.getLongExtra("reminderTime", today);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user