From a19f94e5f07982a5f1959c266092b238355e3f22 Mon Sep 17 00:00:00 2001 From: Mike Dilger Date: Fri, 17 Feb 2023 12:04:24 +1300 Subject: [PATCH] DashMap offers no benefit to single-theaded UI --- src/ui/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ui/mod.rs b/src/ui/mod.rs index b03682f6..a3b10763 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -15,14 +15,13 @@ use crate::globals::GLOBALS; use crate::people::DbPerson; use crate::settings::Settings; use crate::ui::widgets::CopyButton; -use dashmap::DashSet; use eframe::{egui, IconData, Theme}; use egui::{ Color32, ColorImage, Context, Image, ImageData, Label, RichText, SelectableLabel, Sense, TextStyle, TextureHandle, TextureOptions, Ui, Vec2, }; use nostr_types::{Id, IdHex, Metadata, PublicKey, PublicKeyHex}; -use std::collections::HashMap; +use std::collections::{HashMap, HashSet}; use std::sync::atomic::Ordering; use std::time::{Duration, Instant}; use zeroize::Zeroize; @@ -89,7 +88,7 @@ struct GossipUi { // Post rendering render_raw: Option, render_qr: Option, - viewed: DashSet, + viewed: HashSet, // Person page rendering ('npub', 'nprofile', or 'lud06') person_qr: Option<&'static str>, @@ -231,7 +230,7 @@ impl GossipUi { qr_codes: HashMap::new(), render_raw: None, render_qr: None, - viewed: DashSet::new(), + viewed: HashSet::new(), person_qr: None, setting_active_person: false, page: start_page,