mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-18 11:49:01 +00:00
don’t add push devices if array is empty
This commit is contained in:
parent
d7a458a683
commit
3e9600c212
2 changed files with 4 additions and 1 deletions
|
|
@ -108,6 +108,9 @@ public class PushNotificationManager {
|
|||
}
|
||||
|
||||
private Boolean userHasPushDevice() {
|
||||
if (this.user.getPushDevices() == null) {
|
||||
return true;
|
||||
}
|
||||
for(PushDevice pushDevice : this.user.getPushDevices()) {
|
||||
if(pushDevice.getRegId().equals(this.refreshedToken)) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ public class HabitRPGUser extends BaseModel {
|
|||
foreignColumnName = "user_id")})
|
||||
private Invitations invitations;
|
||||
|
||||
private List<PushDevice> pushDevices = new ArrayList<PushDevice>();
|
||||
private List<PushDevice> pushDevices;
|
||||
|
||||
private Purchases purchased;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue