WattpadDownloader icon indicating copy to clipboard operation
WattpadDownloader copied to clipboard

Made "Download More" button work

Open AaronBenDaniel opened this issue 1 year ago • 2 comments

The "Download More" button that is displayed after the user downloads a book does not work. href="/" doesn't reload the page because the user is already on it. This commit forces the page to reload, correctly returning the user to the download page.

AaronBenDaniel avatar Jul 27 '24 21:07 AaronBenDaniel

Hey @AaronBenDaniel, thanks for the catch!

On download, https://github.com/TheOnlyWayUp/WattpadDownloader/blob/85bc4609c2ffcc9563ebeb7f379711032d6fa99e/src/frontend/src/routes/%2Bpage.svelte#L149 after_download_page switches to true, which changes the page content.

A faster way of achieving the same (clearing values and returning to the home page) would be to set after_download_page to false and clearing the raw_story_id (and possibly is_part_id, and story_id - requires some testing) value.

Give it a try?

TheOnlyWayUp avatar Aug 14 '24 15:08 TheOnlyWayUp

What do you think of this?

AaronBenDaniel avatar Aug 21 '24 22:08 AaronBenDaniel

What do you think of this?

Hey @AaronBenDaniel, lgtm!

I made 'Download More' a button instead of an anchor tag - accessibility stuff.

TheOnlyWayUp avatar Aug 31 '24 08:08 TheOnlyWayUp