Rollback api address and remove mimalloc

This commit is contained in:
2026-08-13 11:56:25 +03:00
parent a21fd5e69b
commit a5bcfe0b1d
5 changed files with 20 additions and 38 deletions
+4 -4
View File
@@ -1,11 +1,11 @@
use crate::dictionary::app_data_dir;
use std::io;
use tokio::fs::{File, OpenOptions};
use tokio::io::{AsyncReadExt, AsyncWriteExt, BufReader};
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use zstd::{Decoder, Encoder, DEFAULT_COMPRESSION_LEVEL};
use crate::dictionary::app_data_dir;
const API_URL: &str = "http://127.0.0.1:8089/";
// const API_URL: &str = "https://learning.micialware.ru/";
// const API_URL: &str = "http://127.0.0.1:8089/";
const API_URL: &str = "https://learning.micialware.ru/";
pub async fn send_data(id: String) {
let path = app_data_dir();
+8 -9
View File
@@ -16,27 +16,26 @@ mod word;
mod writing;
mod repetition_settings;
use std::collections::HashMap;
use chrono::{ NaiveDate};
use crate::data_provider::card_sets::load_sets;
use crate::data_provider::settings::get_setting;
use crate::data_provider::sqlite::default_connection;
use crate::data_provider::words::{load_word_groups, load_words};
use crate::dictionary::app_data_dir;
use crate::lang::{WordData, WordGroup};
use crate::navigation::{AppSettings, RootMessage, ScreenState};
use crate::quiz::*;
use crate::repetitions::CardSetSettings;
use crate::RootMessage::Keyboard;
use iced::{window, Font};
use chrono::NaiveDate;
use iced::{keyboard, Subscription, Theme};
use iced_core::Size;
use iced::{window, Font};
use iced_core::window::Position;
use iced_core::Size;
// use mimalloc::MiMalloc;
use rusqlite::Connection;
use mimalloc::MiMalloc;
use crate::data_provider::sqlite::default_connection;
use std::collections::HashMap;
#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;
// #[global_allocator]
// static GLOBAL: MiMalloc = MiMalloc;
const USER_FONT: Font = Font::with_name("Noto Sans JP");
fn main() -> iced::Result {
+2 -1
View File
@@ -144,8 +144,9 @@ impl SyncState {
DisableSync => {
let mut state = self.state.lock().unwrap();
state.sync_data.key = None;
delete_settings("SYNC_KEY".to_string(), &state.connection);
delete_settings("AUTO_WEB_FETCH".to_string(), &state.connection);
}
SwitchAutoSync => {
self.auto_fetch = !self.auto_fetch;