mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 08:21:47 +00:00
cargo fmt
This commit is contained in:
parent
e6d2ad7293
commit
6a87b9c98f
@ -1056,10 +1056,10 @@ impl GossipUi {
|
||||
let where_to_put_background = ui.painter().add(egui::Shape::Noop);
|
||||
let pos = response.rect.right_center() + vec2(10.0, 1.0);
|
||||
let text_color = if self.theme.dark_mode {
|
||||
self.theme.neutral_900()
|
||||
} else {
|
||||
self.theme.neutral_100()
|
||||
};
|
||||
self.theme.neutral_900()
|
||||
} else {
|
||||
self.theme.neutral_100()
|
||||
};
|
||||
let bg_rect = ui
|
||||
.painter()
|
||||
.text(
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::error::{Error, ErrorKind};
|
||||
use crate::GLOBALS;
|
||||
use crate::RunState;
|
||||
use crate::GLOBALS;
|
||||
use std::sync::atomic::Ordering;
|
||||
use std::time::Duration;
|
||||
use tokio::time::Instant;
|
||||
@ -29,7 +29,9 @@ pub(crate) fn start_background_tasks() {
|
||||
|
||||
tick += 1;
|
||||
|
||||
if ! GLOBALS.storage.read_setting_offline() && *read_runstate.borrow() == RunState::Online {
|
||||
if !GLOBALS.storage.read_setting_offline()
|
||||
&& *read_runstate.borrow() == RunState::Online
|
||||
{
|
||||
if let Err(e) = do_online_tasks(tick).await {
|
||||
tracing::error!("{}", e);
|
||||
}
|
||||
@ -56,7 +58,7 @@ async fn do_online_tasks(tick: usize) -> Result<(), Error> {
|
||||
// Update pending every 12 seconds
|
||||
if tick % 12 == 0 {
|
||||
if let Err(e) = GLOBALS.pending.compute_pending() {
|
||||
if ! matches!(e.kind, ErrorKind::NoPrivateKey) {
|
||||
if !matches!(e.kind, ErrorKind::NoPrivateKey) {
|
||||
tracing::error!("{:?}", e);
|
||||
}
|
||||
}
|
||||
@ -71,7 +73,6 @@ async fn do_online_tasks(tick: usize) -> Result<(), Error> {
|
||||
}
|
||||
|
||||
async fn do_general_tasks(tick: usize) -> Result<(), Error> {
|
||||
|
||||
// Update GLOBALS.unread_dms count (every 3 seconds)
|
||||
if tick % 3 == 0 {
|
||||
// Update unread dm channels, whether or not we are in that feed
|
||||
|
Loading…
Reference in New Issue
Block a user