|
|
|
@ -10,7 +10,7 @@ class Notify:
|
|
|
|
|
def __init__(self):
|
|
|
|
|
self.queue = deque(maxlen=10)
|
|
|
|
|
|
|
|
|
|
def write(self, msg, type='info', duration='temporary', button='null', queue='main'):
|
|
|
|
|
def write(self, msg, type='info', duration='temporary', button='null', queue='main', item=0, length=0):
|
|
|
|
|
"""
|
|
|
|
|
:param msg: The message to display.
|
|
|
|
|
:type msg: str
|
|
|
|
@ -19,12 +19,16 @@ class Notify:
|
|
|
|
|
:param duration: The duration of the notification that can be: temporary, permanent
|
|
|
|
|
:type duration: str
|
|
|
|
|
:param button: The kind of button desired that can be: null, refresh, restart
|
|
|
|
|
:type duration: str
|
|
|
|
|
:type button: str
|
|
|
|
|
:param queue: The name of the notification queue to use. Default is 'main'
|
|
|
|
|
:type duration: str
|
|
|
|
|
:param item: The number of the item for progress bar
|
|
|
|
|
:type item: int
|
|
|
|
|
:param length: The length of the group of item for progress bar
|
|
|
|
|
:type length: int
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
self.queue.append(json.dumps([msg, type, duration, button, queue]))
|
|
|
|
|
self.queue.append(json.dumps([msg, type, duration, button, queue, item, length]))
|
|
|
|
|
|
|
|
|
|
def read(self):
|
|
|
|
|
"""
|
|
|
|
|