|
1 | 1 | //! TODO doc comment
|
2 | 2 |
|
3 |
| -use std::collections::{BTreeMap, HashMap}; |
4 |
| -use std::ffi::OsString; |
5 |
| -use std::ops::Deref; |
6 |
| -use std::path::{Path, PathBuf}; |
7 |
| -use std::sync::atomic::{AtomicBool, Ordering}; |
8 |
| -use std::sync::{Arc, OnceLock}; |
9 |
| -use std::time::Duration; |
10 | 3 |
|
11 |
| -use anyhow::{bail, ensure, Context as _, Result}; |
12 |
| -use async_channel::{self as channel, Receiver, Sender}; |
| 4 | +use anyhow::{Context as _, Result}; |
13 | 5 | use pgp::types::PublicKeyTrait;
|
14 |
| -use ratelimit::Ratelimit; |
15 | 6 | use serde::Serialize;
|
16 |
| -use tokio::sync::{Mutex, Notify, RwLock}; |
17 | 7 |
|
18 |
| -use crate::chat::{self, get_chat_cnt, ChatId, ChatVisibility, MuteDuration, ProtectionStatus}; |
19 |
| -use crate::chatlist_events; |
| 8 | +use crate::chat::{self, ChatId, ChatVisibility, MuteDuration, ProtectionStatus}; |
20 | 9 | use crate::config::Config;
|
21 |
| -use crate::constants::{ |
22 |
| - self, DC_BACKGROUND_FETCH_QUOTA_CHECK_RATELIMIT, DC_CHAT_ID_TRASH, DC_VERSION_STR, |
23 |
| -}; |
24 |
| -use crate::contact::{import_vcard, mark_contact_id_as_verified, Contact, ContactId}; |
| 10 | +use crate::constants::DC_CHAT_ID_TRASH; |
| 11 | +use crate::contact::{import_vcard, mark_contact_id_as_verified, ContactId}; |
25 | 12 | use crate::context::{get_version_str, Context};
|
26 |
| -use crate::debug_logging::DebugLogging; |
27 | 13 | use crate::download::DownloadState;
|
28 |
| -use crate::events::{Event, EventEmitter, EventType, Events}; |
29 |
| -use crate::imap::{FolderMeaning, Imap, ServerMetadata}; |
30 |
| -use crate::key::{load_self_public_key, load_self_secret_key, DcKey as _}; |
| 14 | +use crate::key::load_self_public_key; |
31 | 15 | use crate::log::LogExt;
|
32 |
| -use crate::login_param::{ConfiguredLoginParam, EnteredLoginParam}; |
33 |
| -use crate::message::{self, Message, MessageState, MsgId, Viewtype}; |
| 16 | +use crate::message::{Message, Viewtype}; |
34 | 17 | use crate::param::{Param, Params};
|
35 |
| -use crate::peer_channels::Iroh; |
36 |
| -use crate::push::PushSubscriber; |
37 |
| -use crate::quota::QuotaInfo; |
38 |
| -use crate::scheduler::{convert_folder_meaning, SchedulerState}; |
39 |
| -use crate::sql::Sql; |
40 |
| -use crate::stock_str::StockStrings; |
41 |
| -use crate::timesmearing::SmearedTimestamp; |
42 |
| -use crate::tools::{self, create_id, duration_to_str, time, time_elapsed}; |
| 18 | +use crate::tools::{create_id, time}; |
43 | 19 |
|
44 | 20 | #[derive(Serialize)]
|
45 | 21 | struct Statistics {
|
@@ -167,7 +143,8 @@ async fn get_self_report(context: &Context) -> Result<String> {
|
167 | 143 | let key_created = load_self_public_key(context)
|
168 | 144 | .await?
|
169 | 145 | .primary_key
|
170 |
| - .created_at(); |
| 146 | + .created_at() |
| 147 | + .timestamp(); |
171 | 148 |
|
172 | 149 | // how many of the chats active in the last months are:
|
173 | 150 | // - protected
|
|
0 commit comments