mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 16:31:18 +00:00
cargo fmt
This commit is contained in:
parent
f62a125171
commit
1e5300c0f7
@ -3,11 +3,13 @@ use crate::AVATAR_SIZE_F32;
|
||||
use eframe::egui;
|
||||
use egui::{Context, Image, RichText, Sense, Ui, Vec2};
|
||||
use gossip_lib::comms::ToOverlordMessage;
|
||||
use gossip_lib::{GLOBALS, Person, PersonList};
|
||||
use gossip_lib::{Person, PersonList, GLOBALS};
|
||||
use std::sync::atomic::Ordering;
|
||||
|
||||
pub(super) fn update(app: &mut GossipUi, ctx: &Context, _frame: &mut eframe::Frame, ui: &mut Ui) {
|
||||
let followed_pubkeys = GLOBALS.storage.get_people_in_list(PersonList::Followed, None)
|
||||
let followed_pubkeys = GLOBALS
|
||||
.storage
|
||||
.get_people_in_list(PersonList::Followed, None)
|
||||
.unwrap_or(vec![]);
|
||||
let mut people: Vec<Person> = Vec::new();
|
||||
for pk in &followed_pubkeys {
|
||||
|
@ -3,11 +3,13 @@ use crate::AVATAR_SIZE_F32;
|
||||
use eframe::egui;
|
||||
use egui::{Context, Image, RichText, Sense, Ui, Vec2};
|
||||
use gossip_lib::comms::ToOverlordMessage;
|
||||
use gossip_lib::{GLOBALS, Person, PersonList};
|
||||
use gossip_lib::{Person, PersonList, GLOBALS};
|
||||
use std::sync::atomic::Ordering;
|
||||
|
||||
pub(super) fn update(app: &mut GossipUi, ctx: &Context, _frame: &mut eframe::Frame, ui: &mut Ui) {
|
||||
let muted_pubkeys = GLOBALS.storage.get_people_in_list(PersonList::Muted, None)
|
||||
let muted_pubkeys = GLOBALS
|
||||
.storage
|
||||
.get_people_in_list(PersonList::Muted, None)
|
||||
.unwrap_or(vec![]);
|
||||
|
||||
let mut people: Vec<Person> = Vec::new();
|
||||
|
@ -1,4 +1,4 @@
|
||||
use gossip_lib::{GLOBALS, PersonList, Relay};
|
||||
use gossip_lib::{PersonList, Relay, GLOBALS};
|
||||
use nostr_types::{Event, EventKind, PublicKey, RelayUrl};
|
||||
use std::collections::HashSet;
|
||||
|
||||
@ -79,7 +79,9 @@ impl WizardState {
|
||||
.unwrap_or(Vec::new());
|
||||
}
|
||||
|
||||
self.followed = GLOBALS.storage.get_people_in_list(PersonList::Followed, None)
|
||||
self.followed = GLOBALS
|
||||
.storage
|
||||
.get_people_in_list(PersonList::Followed, None)
|
||||
.unwrap_or(vec![]);
|
||||
|
||||
if self.need_discovery_relays() {
|
||||
|
@ -64,8 +64,10 @@ pub async fn process_new_event(
|
||||
}
|
||||
|
||||
// Spam filter (displayable and author is not followed)
|
||||
if event.effective_kind().is_feed_displayable() &&
|
||||
!GLOBALS.people.is_person_in_list(&event.pubkey, PersonList::Followed)
|
||||
if event.effective_kind().is_feed_displayable()
|
||||
&& !GLOBALS
|
||||
.people
|
||||
.is_person_in_list(&event.pubkey, PersonList::Followed)
|
||||
{
|
||||
let author = GLOBALS.storage.read_person(&event.pubkey)?;
|
||||
match crate::filter::filter(event.clone(), author) {
|
||||
|
Loading…
Reference in New Issue
Block a user