11use async_graphql:: { Context , Object } ;
22use uuid:: Uuid ;
33
4+ use crate :: error:: wrapped:: Result ;
45use crate :: {
56 store:: types:: enums:: chapter_quality:: DownloadMode ,
67 utils:: traits_utils:: { MangadexAsyncGraphQLContextExt , MangadexTauriManagerExt } ,
@@ -14,7 +15,7 @@ pub struct ChapterPagesStoreMutation {
1415#[ Object ]
1516#[ cfg_attr( feature = "hotpath" , hotpath:: measure_all) ]
1617impl ChapterPagesStoreMutation {
17- pub async fn fetch_metadata ( & self , ctx : & Context < ' _ > ) -> crate :: Result < bool > {
18+ pub async fn fetch_metadata ( & self , ctx : & Context < ' _ > ) -> Result < bool > {
1819 let app = ctx. get_app_handle :: < tauri:: Wry > ( ) ?;
1920 let store = app. get_chapter_pages_store ( ) ;
2021 if let Ok ( store_read) = store. read ( ) {
@@ -27,7 +28,7 @@ impl ChapterPagesStoreMutation {
2728 Ok ( false )
2829 }
2930 }
30- pub async fn start_caching ( & self , ctx : & Context < ' _ > ) -> crate :: Result < bool > {
31+ pub async fn start_caching ( & self , ctx : & Context < ' _ > ) -> Result < bool > {
3132 let app = ctx. get_app_handle :: < tauri:: Wry > ( ) ?;
3233 let store = app. get_chapter_pages_store ( ) ;
3334 if let Ok ( store_read) = store. read ( ) {
@@ -40,7 +41,7 @@ impl ChapterPagesStoreMutation {
4041 Ok ( false )
4142 }
4243 }
43- pub async fn refetch_page ( & self , ctx : & Context < ' _ > , page : u32 ) -> crate :: Result < bool > {
44+ pub async fn refetch_page ( & self , ctx : & Context < ' _ > , page : u32 ) -> Result < bool > {
4445 let app = ctx. get_app_handle :: < tauri:: Wry > ( ) ?;
4546 let store = app. get_chapter_pages_store ( ) ;
4647 if let Ok ( store_read) = store. read ( ) {
@@ -53,7 +54,7 @@ impl ChapterPagesStoreMutation {
5354 Ok ( false )
5455 }
5556 }
56- pub async fn resend_page ( & self , ctx : & Context < ' _ > , page : u32 ) -> crate :: Result < bool > {
57+ pub async fn resend_page ( & self , ctx : & Context < ' _ > , page : u32 ) -> Result < bool > {
5758 let app = ctx. get_app_handle :: < tauri:: Wry > ( ) ?;
5859 let store = app. get_chapter_pages_store ( ) ;
5960 if let Ok ( store_read) = store. read ( ) {
@@ -66,7 +67,7 @@ impl ChapterPagesStoreMutation {
6667 Ok ( false )
6768 }
6869 }
69- pub async fn resend_all ( & self , ctx : & Context < ' _ > ) -> crate :: Result < bool > {
70+ pub async fn resend_all ( & self , ctx : & Context < ' _ > ) -> Result < bool > {
7071 let app = ctx. get_app_handle :: < tauri:: Wry > ( ) ?;
7172 let store = app. get_chapter_pages_store ( ) ;
7273 if let Ok ( store_read) = store. read ( ) {
@@ -79,7 +80,7 @@ impl ChapterPagesStoreMutation {
7980 Ok ( false )
8081 }
8182 }
82- pub async fn refetch_incompletes ( & self , ctx : & Context < ' _ > ) -> crate :: Result < bool > {
83+ pub async fn refetch_incompletes ( & self , ctx : & Context < ' _ > ) -> Result < bool > {
8384 let app = ctx. get_app_handle :: < tauri:: Wry > ( ) ?;
8485 let store = app. get_chapter_pages_store ( ) ;
8586 if let Ok ( store_read) = store. read ( ) {
@@ -98,7 +99,7 @@ impl ChapterPagesStoreMutation {
9899 export_path : String ,
99100 page : u32 ,
100101 defer : Option < bool > ,
101- ) -> crate :: Result < Option < String > > {
102+ ) -> Result < Option < String > > {
102103 let app = ctx. get_app_handle :: < tauri:: Wry > ( ) ?;
103104 let store = app. get_chapter_pages_store ( ) ;
104105 let handle = {
0 commit comments