Skip to content

Commit

Permalink
Fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
matzipan committed Sep 26, 2023
1 parent 69c0360 commit 327dae7
Showing 4 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/controllers/application.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use adw::subclass::prelude::*;
use gtk::gio::{prelude::*, SimpleAction};
use gtk::prelude::*;
use gtk::subclass::prelude::*;
use gtk::{gdk, gio, glib};
use adw::subclass::prelude::*;

use chrono::prelude::*;
use futures::prelude::*;
@@ -490,7 +490,7 @@ mod imp {
}
}
}

glib::ControlFlow::Continue
});

@@ -579,7 +579,7 @@ impl Application {
let provider = gtk::CssProvider::new();
provider.load_from_data(stylesheet_string);
if let Some(display) = gdk::Display::default() {
gtk::StyleContext::add_provider_for_display(&display, &provider, gtk::STYLE_PROVIDER_PRIORITY_APPLICATION);
gtk::style_context_add_provider_for_display(&display, &provider, gtk::STYLE_PROVIDER_PRIORITY_APPLICATION);
}
}

1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@ extern crate serde_derive;
#[macro_use]
extern crate diesel;

#[macro_use]
extern crate diesel_migrations;

mod backends;
2 changes: 1 addition & 1 deletion src/models/database.rs
Original file line number Diff line number Diff line change
@@ -170,7 +170,7 @@ impl From<melib::email::Envelope> for NewMessage {
folder_id: 0,
subject: String::from(envelope.subject()),
// We go straight for try_into().unwrap() because we know the timestamp won't take 64 bits any time soon
time_received: chrono::NaiveDateTime::from_timestamp(envelope.datetime() as i64, 0), //@TODO
time_received: chrono::NaiveDateTime::from_timestamp_opt(envelope.datetime() as i64, 0).expect("Invalid date time"), //@TODO
from: envelope.field_from_to_string(),
to: envelope.field_to_to_string(),
cc: envelope.field_cc_to_string(),
5 changes: 2 additions & 3 deletions src/ui/window.rs
Original file line number Diff line number Diff line change
@@ -24,14 +24,14 @@ use crate::controllers::{Application, ApplicationMessage};
use crate::models;
use crate::models::folder_conversations_list::row_data::ConversationRowData;

use self::dynamic_list_view::{DynamicListView, DynamicListViewStore};
use self::dynamic_list_view::DynamicListView;
use self::folder_conversation_item::FolderConversationItem;
use self::folders_list_item::FoldersListItem;
use self::message_view::MessageView;

mod imp {
use gtk::{
glib::{closure_local, ParamSpec, Value},
glib::{ParamSpec, Value},
CompositeTemplate,
};

@@ -179,7 +179,6 @@ mod imp {
box_row.upcast::<gtk::Widget>()
});

let sender_clone = self.sender.clone();
let conversation_viewer_stack = self.conversation_viewer_stack.get().clone();
let conversation_viewer_spinner = self.conversation_viewer_spinner.get().clone();

0 comments on commit 327dae7

Please sign in to comment.