refactor: Migrate to maintained badge package
This commit is contained in:
parent
53c45d851f
commit
1c01e98ddd
5 changed files with 16 additions and 15 deletions
|
|
@ -24,9 +24,9 @@ import 'dart:io';
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_app_badger/flutter_app_badger.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||
import 'package:flutter_new_badger/flutter_new_badger.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:matrix/matrix.dart';
|
||||
import 'package:unifiedpush/unifiedpush.dart';
|
||||
|
|
@ -133,9 +133,9 @@ class BackgroundPush {
|
|||
.where((room) => room.isUnreadOrInvited && room.id != roomId)
|
||||
.length;
|
||||
if (unreadCount == 0) {
|
||||
FlutterAppBadger.removeBadge();
|
||||
FlutterNewBadger.removeBadge();
|
||||
} else {
|
||||
FlutterAppBadger.updateBadgeCount(unreadCount);
|
||||
FlutterNewBadger.setBadge(unreadCount);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue