First database deunwrap
This commit is contained in:
1 parent
3cbdf0803b
commit
06bf9138c0
6 files changed
+45
-23
No files matched your search
@@ -27,6 +27,7 @@ use iced_core::svg::Handle;
|
||||
use parking_lot::Mutex;
|
||||
use std::ops::Deref;
|
||||
use std::sync::Arc;
|
||||
use crate::notification::NotificationRequest;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct RepetitionsState {
|
||||
@@ -146,7 +147,9 @@ impl NavigatedPage<RepetitionsMessage> for RepetitionsState {
|
||||
let mut deck = self.selected_deck().unwrap().clone();
|
||||
let mut state = self.state.lock();
|
||||
{
|
||||
update_deck(&mut deck.general_settings, &state.connection);
|
||||
if let Err(e) = update_deck(&mut deck.general_settings, &state.connection){
|
||||
return Task::done(RootMessage::PushNotification(NotificationRequest::Error(e)))
|
||||
}
|
||||
if let Some(index) = deck.index {
|
||||
state.decks[index] = deck.general_settings.clone();
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user