Skip to content

Commit

Permalink
Merge branch 'dev' into user_tag_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Flemmli97 committed Jan 26, 2024
2 parents 852141d + ab61e6e commit 60e8daf
Show file tree
Hide file tree
Showing 65 changed files with 142 additions and 98 deletions.
17 changes: 12 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ arboard = "3.2"
humansize = "2.1.3"
uuid = { version = "1", features = ["serde", "v4"] }
libloading = "0.7.4"
warp = { git = "https://github.com/Satellite-im/Warp", rev = "a92a3674cd1d2e700e5275beb606984160cb9532" }
warp-ipfs = { git = "https://github.com/Satellite-im/Warp", rev = "a92a3674cd1d2e700e5275beb606984160cb9532" }
warp-blink-wrtc = { git = "https://github.com/Satellite-im/Warp", rev = "a92a3674cd1d2e700e5275beb606984160cb9532" }
warp = { git = "https://github.com/Satellite-im/Warp", rev = "32f4c53fc462d53553a31762ecd12b4af9329a4a" }
warp-ipfs = { git = "https://github.com/Satellite-im/Warp", rev = "32f4c53fc462d53553a31762ecd12b4af9329a4a" }
warp-blink-wrtc = { git = "https://github.com/Satellite-im/Warp", rev = "32f4c53fc462d53553a31762ecd12b4af9329a4a" }
rfd = "0.11.3"
mime = "0.3.16"
serde = "1.0"
Expand All @@ -72,6 +72,9 @@ tempfile = "3.0.7"
fdlimit = "0.2"

once_cell = "1.17"
parking_lot = { version = "0.12" }
tracing = { version = "0.1" }
tracing-futures = { version = "0.2" }

futures = "0.3"
tokio = { version = "1", features = ["full"] }
Expand Down
2 changes: 2 additions & 0 deletions common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ names = "0.14.0"
titlecase = { workspace = true }
substring = "1.4.5"
plot_icon = "0.3.0"
tracing.workspace = true
parking_lot.workspace = true
icons = { workspace = true }
humansize = { workspace = true }
zip = "0.6.4"
Expand Down
2 changes: 1 addition & 1 deletion common/src/language/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::collections::HashMap;
use fluent_templates::{
fluent_bundle::FluentValue, once_cell::sync::Lazy, LanguageIdentifier, Loader,
};
use parking_lot::RwLock;
use unic_langid::langid;
use warp::sync::RwLock;

use crate::LOCALES;

Expand Down
2 changes: 1 addition & 1 deletion common/src/notifications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use super::sounds::{Play, Sounds};
use derive_more::Display;
use notify_rust::Notification;
use std::sync::Arc;
use tracing::log;
use uuid::Uuid;
use warp::logging::tracing::log;

use once_cell::sync::Lazy;
use tokio::sync::{
Expand Down
2 changes: 1 addition & 1 deletion common/src/sounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::sync::{
atomic::{AtomicBool, Ordering},
Arc,
};
use warp::logging::tracing::log;
use tracing::log;

pub enum Sounds {
Notification,
Expand Down
2 changes: 1 addition & 1 deletion common/src/state/configuration.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use serde::{Deserialize, Serialize};
use warp::logging::tracing::log;
use tracing::log;

use crate::STATIC_ARGS;

Expand Down
9 changes: 3 additions & 6 deletions common/src/state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,9 @@ use std::{
time::{Duration, Instant},
};
use uuid::Uuid;
use warp::{
crypto::DID,
logging::tracing::log,
multipass::identity::IdentityStatus,
raygun::{self},
};
use warp::{crypto::DID, multipass::identity::IdentityStatus, raygun};

use tracing::log;

use self::call::Call;
use self::pending_message::PendingMessage;
Expand Down
2 changes: 1 addition & 1 deletion common/src/state/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use std::{
collections::{hash_map, HashMap},
rc::Weak,
};
use tracing::log;
use uuid::Uuid;
use warp::logging::tracing::log;

use super::{call, notifications::Notifications};

Expand Down
3 changes: 2 additions & 1 deletion common/src/state/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ use std::{
use once_cell::sync::Lazy;
use regex::{Captures, Regex, Replacer};
use titlecase::titlecase;
use tracing::log;
use uuid::Uuid;
use walkdir::WalkDir;
use warp::{crypto::DID, logging::tracing::log};
use warp::crypto::DID;

use crate::{get_extras_dir, STATIC_ARGS};

Expand Down
2 changes: 1 addition & 1 deletion common/src/utils/clear_temp_files_dir.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::{fs, io};
use warp::logging::tracing::log;
use tracing::log;

use crate::STATIC_ARGS;

Expand Down
2 changes: 1 addition & 1 deletion common/src/warp_runner/manager/commands/blink_commands.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use derive_more::Display;
use futures::channel::oneshot::{self};
use tokio::sync::mpsc::UnboundedReceiver;
use tracing::log;
use uuid::Uuid;
use warp::logging::tracing::log;
use warp::{
blink::{AudioDeviceConfig, AudioTestEvent},
crypto::DID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ use warp::{
ConstellationProgressStream, Progression,
},
error::Error,
logging::tracing::log,
sync::RwLock,
};

use parking_lot::RwLock;
use tracing::log;

static DIRECTORIES_AVAILABLE_TO_BROWSE: Lazy<RwLock<Vec<Directory>>> =
Lazy::new(|| RwLock::new(Vec::new()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ use warp::{
constellation::file::FileType,
crypto::DID,
error::Error,
logging::tracing::log,
multipass::{
self,
identity::{self, Identifier, IdentityImage, IdentityStatus, IdentityUpdate},
},
};

use tracing::log;

use crate::{
state::{self, Identity},
warp_runner::{ui_adapter::dids_to_identity, Account},
Expand Down
5 changes: 4 additions & 1 deletion common/src/warp_runner/manager/commands/other_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ use zip::{result::ZipError, write::FileOptions};

use derive_more::Display;
use futures::channel::oneshot;
use warp::{error, logging::tracing::log};
use warp::error;

use tracing::log;

#[derive(Display)]
pub enum OtherCmd {
#[display(fmt = "CompressFolder {{ src: {src:?}, dest: {dest:?} }} ")]
Expand Down
3 changes: 2 additions & 1 deletion common/src/warp_runner/manager/commands/raygun_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ use warp::{
constellation::ConstellationProgressStream,
crypto::DID,
error::Error,
logging::tracing::log,
raygun::{
self, AttachmentEventStream, ConversationType, GroupSettings, Location, PinState,
ReactionState,
},
};

use tracing::log;

use crate::{
state::{chats, identity, Friends},
warp_runner::{
Expand Down
3 changes: 2 additions & 1 deletion common/src/warp_runner/manager/events.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use warp::{
blink::BlinkEventKind,
logging::tracing::log,
multipass::MultiPassEventKind,
raygun::{MessageEventKind, RayGunEventKind},
};

use tracing::log;

use crate::{
warp_runner::{
conv_stream,
Expand Down
6 changes: 4 additions & 2 deletions common/src/warp_runner/manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ use std::sync::Arc;
use tokio::sync::Notify;

use warp::{
blink::BlinkEventStream, logging::tracing::log, multipass::MultiPassEventStream,
raygun::RayGunEventStream, tesseract::Tesseract,
blink::BlinkEventStream, multipass::MultiPassEventStream, raygun::RayGunEventStream,
tesseract::Tesseract,
};

use tracing::log;

use super::{conv_stream, Account, Calling, Messaging, Storage};
use crate::WARP_CMD_CH;

Expand Down
24 changes: 9 additions & 15 deletions common/src/warp_runner/mod.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
//! Defines important types and structs, and spawns the main task for warp_runner - manager::run.
use derive_more::Display;
use std::{
collections::{HashMap, HashSet},
sync::Arc,
};
use std::sync::Arc;

use tokio::sync::{
broadcast,
mpsc::{UnboundedReceiver, UnboundedSender},
Mutex, Notify,
};
use tracing::log;
use warp::{
blink::{
Blink::{self},
BlinkEventKind,
},
constellation::{file::FileType, Constellation},
error::Error,
logging::tracing::log,
multipass::{self, IdentityImportOption, MultiPass},
raygun::RayGun,
tesseract::Tesseract,
Expand Down Expand Up @@ -353,16 +350,13 @@ impl From<&DiscoveryMode> for Discovery {
addresses: vec![address.parse().expect("Valid multiaddr address")],
},
},
DiscoveryMode::Shuttle => Discovery::Shuttle {
addresses: HashMap::from_iter([(
"12D3KooWJSes8386p2T1sMeZ2DzsNJThKkZWbj4US6uPMpEgBTHu"
.parse()
.expect("Valid id"),
HashSet::from_iter(["/ip4/104.236.194.35/tcp/34053"
.parse()
.expect("valid addr")]),
)]),
},
DiscoveryMode::Shuttle => {
let addresses = Vec::from_iter(["/ip4/104.236.194.35/tcp/34053/p2p/12D3KooWJSes8386p2T1sMeZ2DzsNJThKkZWbj4US6uPMpEgBTHu"
.parse()
.expect("valid addr")]);

Discovery::Shuttle { addresses }
}
DiscoveryMode::Disable => Discovery::None,
}
}
Expand Down
3 changes: 2 additions & 1 deletion common/src/warp_runner/ui_adapter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ use warp::{
constellation::file::File,
crypto::DID,
error::Error,
logging::tracing::log,
multipass::identity::{Identifier, Platform},
raygun::{self, Conversation, MessageOptions},
};

use tracing::log;

use super::{
manager::commands::identity_image_to_base64, FetchMessagesConfig, FetchMessagesResponse,
};
Expand Down
6 changes: 3 additions & 3 deletions common/src/warp_runner/ui_adapter/raygun_event.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use super::{super::conv_stream, init_conversation, ChatAdapter};
use derive_more::Display;
use tracing::log;
use uuid::Uuid;
use warp::{error::Error, logging::tracing::log, raygun::RayGunEventKind};

use super::{super::conv_stream, init_conversation, ChatAdapter};
use warp::{error::Error, raygun::RayGunEventKind};

#[allow(clippy::large_enum_variant)]
#[derive(Display, Clone)]
Expand Down
Loading

0 comments on commit 60e8daf

Please sign in to comment.