Extract store invalidation detection into separate AppState
This commit is contained in:
parent
0e7e54bf71
commit
46f5bc38b8
4 changed files with 75 additions and 50 deletions
15
gdn-app/src-tauri/src/state.rs
Normal file
15
gdn-app/src-tauri/src/state.rs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
use gdn::store::Store;
|
||||
|
||||
pub struct AppState {
|
||||
pub store: Store,
|
||||
pub store_last_id: Option<u64>,
|
||||
}
|
||||
|
||||
impl AppState {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
store: Store::new(),
|
||||
store_last_id: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue