File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,9 @@ async def change_source(self, source: PageSource):
6767 def should_add_reactions (self ) -> bool :
6868 return self .should_add_reactions_or_buttons ()
6969
70+ def should_add_buttons (self ) -> bool :
71+ return self .should_add_reactions_or_buttons ()
72+
7073 def should_add_reactions_or_buttons (self ) -> bool :
7174 return self ._source .is_paginating ()
7275
@@ -268,8 +271,8 @@ def __init__(
268271 if "disable_buttons_after" not in kwargs :
269272 kwargs ["disable_buttons_after" ] = True
270273 super ().__init__ (source , ** kwargs )
271- # skip adding buttons if inherit_buttons=False was passed to metaclass
272- if not self .__inherit_buttons__ :
274+ # skip adding buttons if inherit_buttons=False was passed to metaclass or only one page
275+ if not self .__inherit_buttons__ or not self . should_add_buttons () :
273276 return
274277 # add buttons to the view
275278 pagination_emojis = (
You can’t perform that action at this time.
0 commit comments