From d70e168c5dd7b1476847c40c8612c8b498c9e1e7 Mon Sep 17 00:00:00 2001
From: dobefore <1432338032@qq.com>
Date: Fri, 3 Mar 2023 17:22:08 +0800
Subject: [PATCH] changes

---
 rslib/i18n/build/gather.rs                      |  6 +++---
 rslib/src/sync/http_server/media_manager/mod.rs |  4 ++--
 rslib/src/sync/http_server/mod.rs               | 10 +++++-----
 rslib/src/sync/http_server/user.rs              |  2 +-
 rslib/src/sync/request/mod.rs                   |  4 ++--
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/rslib/i18n/build/gather.rs b/rslib/i18n/build/gather.rs
index 3064e9691..a7901c80c 100644
--- a/rslib/i18n/build/gather.rs
+++ b/rslib/i18n/build/gather.rs
@@ -21,11 +21,11 @@ pub fn get_ftl_data() -> TranslationsByLang {
     let ftl_base = source_tree_root();
     add_folder(&mut map, &ftl_base.join("core"), "templates");
     // And core translations from submodule
-    add_translation_root(&mut map, &ftl_base.join("core-repo/core"), true);
+    // add_translation_root(&mut map, &ftl_base.join("core-repo/core"), true);
 
     if let Some(path) = extra_ftl_root() {
         // Mobile client has requested its own extra translations
-        add_translation_root(&mut map, &path, false);
+        // add_translation_root(&mut map, &path, false);
         // In a debug build, also include the Qt translations so that our Python unit
         // tests pass.
         if std::env::var("RELEASE").is_err() {
@@ -35,7 +35,7 @@ pub fn get_ftl_data() -> TranslationsByLang {
         // Qt core templates from this repo
         add_folder(&mut map, &ftl_base.join("qt"), "templates");
         // And translations from submodule
-        add_translation_root(&mut map, &ftl_base.join("qt-repo/desktop"), true)
+        // add_translation_root(&mut map, &ftl_base.join("qt-repo/desktop"), true)
     }
     map
 }
diff --git a/rslib/src/sync/http_server/media_manager/mod.rs b/rslib/src/sync/http_server/media_manager/mod.rs
index ca5214a20..4e35c89f9 100644
--- a/rslib/src/sync/http_server/media_manager/mod.rs
+++ b/rslib/src/sync/http_server/media_manager/mod.rs
@@ -15,13 +15,13 @@ use crate::sync::media::changes::MediaChange;
 use crate::sync::media::database::server::ServerMediaDatabase;
 use crate::sync::media::sanity::MediaSanityCheckResponse;
 
-pub(crate) struct ServerMediaManager {
+pub struct ServerMediaManager {
     pub media_folder: PathBuf,
     pub db: ServerMediaDatabase,
 }
 
 impl ServerMediaManager {
-    pub(crate) fn new(user_folder: &Path) -> HttpResult<ServerMediaManager> {
+    pub fn new(user_folder: &Path) -> HttpResult<ServerMediaManager> {
         let media_folder = user_folder.join("media");
         create_dir_all(&media_folder).or_internal_err("media folder create")?;
         Ok(Self {
diff --git a/rslib/src/sync/http_server/mod.rs b/rslib/src/sync/http_server/mod.rs
index 9e585c3c7..d3e137ea6 100644
--- a/rslib/src/sync/http_server/mod.rs
+++ b/rslib/src/sync/http_server/mod.rs
@@ -3,9 +3,9 @@
 
 mod handlers;
 mod logging;
-mod media_manager;
-mod routes;
-mod user;
+pub mod media_manager;
+pub mod routes;
+pub mod user;
 
 use std::collections::HashMap;
 use std::env;
@@ -43,12 +43,12 @@ use crate::sync::request::MAXIMUM_SYNC_PAYLOAD_BYTES;
 use crate::sync::response::SyncResponse;
 
 pub struct SimpleServer {
-    state: Mutex<SimpleServerInner>,
+   pub state: Mutex<SimpleServerInner>,
 }
 
 pub struct SimpleServerInner {
     /// hkey->user
-    users: HashMap<String, User>,
+  pub  users: HashMap<String, User>,
 }
 
 impl SimpleServerInner {
diff --git a/rslib/src/sync/http_server/user.rs b/rslib/src/sync/http_server/user.rs
index df7ae7596..39ead0d2a 100644
--- a/rslib/src/sync/http_server/user.rs
+++ b/rslib/src/sync/http_server/user.rs
@@ -13,7 +13,7 @@ use crate::sync::error::HttpResult;
 use crate::sync::error::OrHttpErr;
 use crate::sync::http_server::media_manager::ServerMediaManager;
 
-pub(in crate::sync) struct User {
+pub struct User {
     pub name: String,
     pub col: Option<Collection>,
     pub sync_state: Option<ServerSyncState>,
diff --git a/rslib/src/sync/request/mod.rs b/rslib/src/sync/request/mod.rs
index acc56eead..0b2748c8d 100644
--- a/rslib/src/sync/request/mod.rs
+++ b/rslib/src/sync/request/mod.rs
@@ -2,7 +2,7 @@
 // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
 
 pub mod header_and_stream;
-mod multipart;
+pub mod multipart;
 
 use std::any::Any;
 use std::env;
@@ -38,7 +38,7 @@ use crate::version::sync_client_version_short;
 #[derive(Clone)]
 pub struct SyncRequest<T> {
     pub data: Vec<u8>,
-    json_output_type: PhantomData<T>,
+    pub json_output_type: PhantomData<T>,
     pub sync_version: SyncVersion,
     /// empty with older clients
     pub client_version: String,
-- 
2.28.0.windows.1

