Fix: [ALAS] Scroll methods should all have returns

This commit is contained in:
LmeSzinc 2024-01-02 03:56:12 +08:00
parent 1ba3882eaf
commit 2180fd308a

View File

@ -203,10 +203,10 @@ class Scroll:
multiply = self.length / (self.total - self.length) multiply = self.length / (self.total - self.length)
target = current + page * multiply target = current + page * multiply
target = round(min(max(target, 0), 1), 3) target = round(min(max(target, 0), 1), 3)
self.set(target, main=main, random_range=random_range, skip_first_screenshot=True) return self.set(target, main=main, random_range=random_range, skip_first_screenshot=True)
def next_page(self, main, page=0.8, random_range=(-0.01, 0.01), skip_first_screenshot=True): def next_page(self, main, page=0.8, random_range=(-0.01, 0.01), skip_first_screenshot=True):
self.drag_page(page, main=main, random_range=random_range, skip_first_screenshot=skip_first_screenshot) return self.drag_page(page, main=main, random_range=random_range, skip_first_screenshot=skip_first_screenshot)
def prev_page(self, main, page=0.8, random_range=(-0.01, 0.01), skip_first_screenshot=True): def prev_page(self, main, page=0.8, random_range=(-0.01, 0.01), skip_first_screenshot=True):
self.drag_page(-page, main=main, random_range=random_range, skip_first_screenshot=skip_first_screenshot) return self.drag_page(-page, main=main, random_range=random_range, skip_first_screenshot=skip_first_screenshot)