Skip to content

Commit

Permalink
[*] improve ui
Browse files Browse the repository at this point in the history
  • Loading branch information
heng30 committed Jul 2, 2024
1 parent 82fa1e6 commit da77cb4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

build-evn=SLINT_STYLE=material
pwd=${shell pwd}
build-evn=SLINT_STYLE=material RUSTFLAGS="--remap-path-prefix $(HOME)=/home --remap-path-prefix $(pwd)=/build"
run-evn=RUST_LOG=error,warn,info,debug,sqlx=off,reqwest=off,html2text=off
version=`git describe --tags --abbrev=0`

Expand All @@ -13,6 +14,10 @@ build-release:
$(build-evn) cargo apk build --lib --release
cp -f target/release/apk/rssbox.apk target/rssbox-${version}.apk

build-release-mold:
$(build-evn) mold --run cargo apk build --lib --release
cp -f target/release/apk/rssbox.apk target/rssbox-${version}.apk

# not work well
xbuild:
$(build-evn) x build --debug --platform android --format apk --arch arm64
Expand All @@ -27,12 +32,18 @@ run:
run-release:
RUST_BACKTRACE=1 $(run-evn) cargo apk run --lib --release

run-release-mold:
RUST_BACKTRACE=1 $(run-evn) mold --run cargo apk run --lib --release

install:
$(build-evn) $(run-evn) cargo apk run --lib --release

debug:
$(build-evn) $(run-evn) cargo run --bin rssbox-desktop --features=desktop

debug-mold:
$(build-evn) $(run-evn) mold --run cargo run --bin rssbox-desktop --features=desktop

debug-local:
$(run-evn) ./target/debug/rssbox-desktop

Expand Down Expand Up @@ -70,6 +81,9 @@ clean-incremental:
rm -rf ./target/debug/incremental/*
rm -rf ./target/aarch64-linux-android/debug/incremental

clean-unused-dependences:
cargo machete

clean:
cargo clean

Expand Down
2 changes: 1 addition & 1 deletion src/logic/rss.rs
Original file line number Diff line number Diff line change
Expand Up @@ -803,10 +803,10 @@ async fn sync_rss(ui: Weak<AppWindow>, items: Vec<SyncItem>) -> Vec<ErrorMsg> {
let _ = slint::invoke_from_event_loop(move || {
let ui = ui.unwrap();
super::entry::update_new_entrys(&ui, suuid.as_str(), entrys);
ui.global::<Store>().invoke_refresh_current_tab();

if suuid.as_str() == ui.global::<Store>().get_current_rss_uuid().as_str() {
notify_ui_update_unread_counts(&ui);
ui.global::<Store>().invoke_refresh_current_tab();
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/version.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pub static VERSION: &str = "v0.9.5";
pub static VERSION: &str = "v0.9.6";
7 changes: 0 additions & 7 deletions ui/appwindow.slint
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { Util } from "./util.slint";
import { Panel } from "./panel/panel.slint";
import { Toast, IconsDialog, IconsDialogSetting, OkCancelDialogV2, Blanket, LanguageDialog, InputBar, OkCancelDialogSetting, LandingPage } from "./base/widgets.slint";

// import { Drawer, DrawerPosition, TextBtn } from "./base/widgets.slint";

export component AppWindow inherits Window {
default-font-size: Theme.default-font-size;
default-font-family: Theme.default-font-family;
Expand Down Expand Up @@ -69,11 +67,6 @@ export component AppWindow inherits Window {
Store.is-show-landing-page = false;
}
}

// Rectangle {
// visible: false;
// background: red;
// }
}

export { Util, Logic, Store, Theme }
2 changes: 1 addition & 1 deletion ui/logic.slint
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export global Logic {
callback update-cache-size();
callback remove-all-cache();

callback add-to_find-blacklist(string); // rss-entry-url
callback add-to-find-blacklist(string); // rss-entry-url
callback recover-from-find-blacklist(int, string); // index, find-item-url

callback copy-to-clipboard(string); // msg
Expand Down

0 comments on commit da77cb4

Please sign in to comment.