fix lints
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
use std::rc::Rc;
|
||||
|
||||
|
||||
@ -8,7 +8,6 @@ pub mod ntfy_capnp {
|
||||
include!(concat!(env!("OUT_DIR"), "/src/ntfy_capnp.rs"));
|
||||
}
|
||||
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Clone)]
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
use std::cell::{Cell, OnceCell, RefCell};
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::ops::ControlFlow;
|
||||
use std::rc::{Rc, Weak};
|
||||
use std::sync::Arc;
|
||||
@ -20,7 +20,7 @@ use crate::SharedEnv;
|
||||
use crate::{
|
||||
message_repo::Db,
|
||||
models::{self, MinMessage},
|
||||
ntfy_capnp::{account, output_channel, subscription, system_notifier, watch_handle, Status},
|
||||
ntfy_capnp::{output_channel, subscription, system_notifier, watch_handle, Status},
|
||||
topic_listener::{build_client, TopicListener},
|
||||
};
|
||||
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
use std::collections::HashMap;
|
||||
use std::ops::ControlFlow;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
use futures::prelude::*;
|
||||
use reqwest::header::HeaderValue;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tokio::io::AsyncBufReadExt;
|
||||
use tokio::sync::mpsc;
|
||||
|
||||
@ -133,7 +133,7 @@ impl NotifyApplication {
|
||||
})
|
||||
.build();
|
||||
|
||||
let action_about = gio::ActionEntry::builder("preferences")
|
||||
let action_preferences = gio::ActionEntry::builder("preferences")
|
||||
.activate(|app: &Self, _, _| {
|
||||
app.show_preferences();
|
||||
})
|
||||
@ -156,7 +156,12 @@ impl NotifyApplication {
|
||||
app.handle_message_action(action);
|
||||
})
|
||||
.build();
|
||||
self.add_action_entries([action_quit, action_about, message_action]);
|
||||
self.add_action_entries([
|
||||
action_quit,
|
||||
action_about,
|
||||
action_preferences,
|
||||
message_action,
|
||||
]);
|
||||
}
|
||||
|
||||
fn handle_message_action(&self, action: models::Action) {
|
||||
|
||||
@ -1,17 +1,10 @@
|
||||
use std::cell::Cell;
|
||||
use std::cell::OnceCell;
|
||||
|
||||
use adw::prelude::*;
|
||||
use adw::subclass::prelude::*;
|
||||
use futures::prelude::*;
|
||||
use gtk::{gio, glib};
|
||||
use ntfy_daemon::models;
|
||||
use ntfy_daemon::ntfy_capnp::{system_notifier, Status};
|
||||
use tracing::warn;
|
||||
use ntfy_daemon::ntfy_capnp::system_notifier;
|
||||
|
||||
use crate::application::NotifyApplication;
|
||||
use crate::config::{APP_ID, PROFILE};
|
||||
use crate::subscription::Subscription;
|
||||
use crate::widgets::*;
|
||||
|
||||
mod imp {
|
||||
@ -157,7 +150,7 @@ impl NotifyPreferences {
|
||||
acc.set_server(server[..].into());
|
||||
req.get().set_password(password[..].into());
|
||||
|
||||
let res = req.send().promise.await?;
|
||||
req.send().promise.await?;
|
||||
|
||||
self.show_accounts().await?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user