Skip to content

Commit 0f976ee

Browse files
committed
fix: in service always setting new id with time
1 parent 5842928 commit 0f976ee

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

android_notify/sword.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,10 @@ def __format_channel(self, channel_name:str='Default Channel',channel_id:str='de
783783
self.channel_id = generated_id
784784

785785
def __get_unique_id(self):
786+
if from_service_file():
787+
max_int = 2_147_483_647
788+
return int(time.time() * 1000) % max_int
789+
786790
notification_id = self.notification_ids[-1] + 1
787791
self.notification_ids.append(notification_id)
788792
return notification_id

0 commit comments

Comments
 (0)