mirror of
https://github.com/wrwrabbit/Partisan-Telegram-Android.git
synced 2026-05-05 15:41:02 +00:00
Update to 8.1.2 (2432)
This commit is contained in:
parent
58aded63e9
commit
09f95ec069
15 changed files with 94 additions and 51 deletions
|
|
@ -130,8 +130,6 @@ public class NotificationsController extends BaseController {
|
|||
private int notificationId;
|
||||
private String notificationGroup;
|
||||
|
||||
private int lastInternalNotificationId;
|
||||
|
||||
static {
|
||||
if (Build.VERSION.SDK_INT >= 26 && ApplicationLoader.applicationContext != null) {
|
||||
notificationManager = NotificationManagerCompat.from(ApplicationLoader.applicationContext);
|
||||
|
|
@ -158,8 +156,6 @@ public class NotificationsController extends BaseController {
|
|||
|
||||
public NotificationsController(int instance) {
|
||||
super(instance);
|
||||
|
||||
lastInternalNotificationId = instance * 1000000 + 5000;
|
||||
notificationId = currentAccount + 1;
|
||||
notificationGroup = "messages" + (currentAccount == 0 ? "" : currentAccount);
|
||||
SharedPreferences preferences = getAccountInstance().getNotificationsSettings();
|
||||
|
|
@ -3892,7 +3888,10 @@ public class NotificationsController extends BaseController {
|
|||
arrayList.add(messageObject);
|
||||
}
|
||||
|
||||
LongSparseArray<Integer> oldIdsWear = wearNotificationsIds.clone();
|
||||
LongSparseArray<Integer> oldIdsWear = new LongSparseArray<>();
|
||||
for (int i = 0; i < wearNotificationsIds.size(); i++) {
|
||||
oldIdsWear.put(wearNotificationsIds.keyAt(i), wearNotificationsIds.valueAt(i));
|
||||
}
|
||||
wearNotificationsIds.clear();
|
||||
|
||||
class NotificationHolder {
|
||||
|
|
@ -3914,7 +3913,7 @@ public class NotificationsController extends BaseController {
|
|||
|
||||
void call() {
|
||||
if (BuildVars.LOGS_ENABLED) {
|
||||
FileLog.w("show dialog notification with id " + id);
|
||||
FileLog.w("show dialog notification with id " + id + " " + dialogId + " user=" + user + " chat=" + chat);
|
||||
}
|
||||
try {
|
||||
notificationManager.notify(id, notification.build());
|
||||
|
|
@ -3947,7 +3946,7 @@ public class NotificationsController extends BaseController {
|
|||
|
||||
Integer internalId = oldIdsWear.get(dialogId);
|
||||
if (internalId == null) {
|
||||
internalId = lastInternalNotificationId++;
|
||||
internalId = (int) dialogId + (int) (dialogId >> 32);
|
||||
} else {
|
||||
oldIdsWear.remove(dialogId);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue