No need for buttons if only 1 page

Signed-off-by: anas <e.anastayyar@gmail.com>
This commit is contained in:
anas 2021-07-16 15:45:43 +03:00
parent dcdbbccb68
commit 6f85fdc6ea
2 changed files with 10 additions and 10 deletions

View File

@ -138,12 +138,12 @@ def get_readable_message():
msg += f"\n<b>To Stop:</b> <code>/{BotCommands.CancelMirror} {download.gid()}</code>"
msg += "\n\n"
if STATUS_LIMIT is not None:
limit = COUNT + STATUS_LIMIT
if INDEX >= limit:
if INDEX >= COUNT + STATUS_LIMIT:
break
if STATUS_LIMIT is not None:
if INDEX > limit:
if INDEX > COUNT + STATUS_LIMIT:
return None, None
if dick_no > STATUS_LIMIT:
msg += f"Page: {PAGE_NO}/{pages} | Tasks: {dick_no}\n"
buttons = button_build.ButtonMaker()
buttons.sbutton("Previous", "pre")