diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a6a8971..2ea7bdb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,7 @@ # Trigger CI on PR updates and main branch pushes # Uses caching and selective path triggers to optimize performance -name: Robrix Rust CI +name: Robrix CI # Only `main` branch on: @@ -45,7 +45,7 @@ jobs: # Basic compilation check to ensure code builds check: if: github.event.pull_request.draft == false - name: Check + name: cargo check runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -60,7 +60,7 @@ jobs: clippy: if: github.event.pull_request.draft == false - name: Clippy + name: clippy runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -77,9 +77,9 @@ jobs: typos: if: github.event.pull_request.draft == false - name: Check for typos + name: typos runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Check for typos - uses: crate-ci/typos@master \ No newline at end of file + uses: crate-ci/typos@master diff --git a/Cargo.lock b/Cargo.lock index efe076a..5d055f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1981,7 +1981,7 @@ dependencies = [ [[package]] name = "makepad-derive-live" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "makepad-live-id", "makepad-micro-proc-macro", @@ -1990,7 +1990,7 @@ dependencies = [ [[package]] name = "makepad-derive-wasm-bridge" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "makepad-micro-proc-macro", ] @@ -1998,7 +1998,7 @@ dependencies = [ [[package]] name = "makepad-derive-widget" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "makepad-live-id", "makepad-micro-proc-macro", @@ -2007,7 +2007,7 @@ dependencies = [ [[package]] name = "makepad-draw" version = "0.6.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "ab_glyph_rasterizer", "fxhash", @@ -2024,17 +2024,17 @@ dependencies = [ [[package]] name = "makepad-futures" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" [[package]] name = "makepad-futures-legacy" version = "0.7.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" [[package]] name = "makepad-html" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "makepad-live-id", ] @@ -2042,7 +2042,7 @@ dependencies = [ [[package]] name = "makepad-http" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" [[package]] name = "makepad-jni-sys" @@ -2053,7 +2053,7 @@ checksum = "9775cbec5fa0647500c3e5de7c850280a88335d1d2d770e5aa2332b801ba7064" [[package]] name = "makepad-live-compiler" version = "0.5.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "makepad-derive-live", "makepad-live-tokenizer", @@ -2063,7 +2063,7 @@ dependencies = [ [[package]] name = "makepad-live-id" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "makepad-live-id-macros", ] @@ -2071,7 +2071,7 @@ dependencies = [ [[package]] name = "makepad-live-id-macros" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "makepad-micro-proc-macro", ] @@ -2079,7 +2079,7 @@ dependencies = [ [[package]] name = "makepad-live-tokenizer" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "makepad-live-id", "makepad-math", @@ -2089,7 +2089,7 @@ dependencies = [ [[package]] name = "makepad-markdown" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "makepad-live-id", ] @@ -2097,17 +2097,17 @@ dependencies = [ [[package]] name = "makepad-math" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" [[package]] name = "makepad-micro-proc-macro" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" [[package]] name = "makepad-micro-serde" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "makepad-live-id", "makepad-micro-serde-derive", @@ -2116,7 +2116,7 @@ dependencies = [ [[package]] name = "makepad-micro-serde-derive" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "makepad-micro-proc-macro", ] @@ -2124,12 +2124,12 @@ dependencies = [ [[package]] name = "makepad-objc-sys" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" [[package]] name = "makepad-platform" version = "0.6.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "hilog-sys", "makepad-android-state", @@ -2152,7 +2152,7 @@ dependencies = [ [[package]] name = "makepad-rustybuzz" version = "0.8.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2167,7 +2167,7 @@ dependencies = [ [[package]] name = "makepad-shader-compiler" version = "0.5.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "makepad-live-compiler", ] @@ -2175,7 +2175,7 @@ dependencies = [ [[package]] name = "makepad-vector" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "resvg", "ttf-parser", @@ -2184,7 +2184,7 @@ dependencies = [ [[package]] name = "makepad-wasm-bridge" version = "0.4.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "makepad-derive-wasm-bridge", "makepad-live-id", @@ -2193,48 +2193,24 @@ dependencies = [ [[package]] name = "makepad-widgets" version = "0.6.0" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ "makepad-derive-widget", "makepad-draw", "makepad-html", "makepad-markdown", - "makepad-zune-jpeg", "makepad-zune-png", "unicode-segmentation", -] - -[[package]] -name = "makepad-zune-core" -version = "0.2.14" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" -dependencies = [ - "bitflags 2.6.0", -] - -[[package]] -name = "makepad-zune-inflate" -version = "0.2.54" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" -dependencies = [ - "simd-adler32", -] - -[[package]] -name = "makepad-zune-jpeg" -version = "0.3.17" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" -dependencies = [ - "makepad-zune-core", + "zune-jpeg", ] [[package]] name = "makepad-zune-png" -version = "0.2.1" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +version = "0.4.10" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" dependencies = [ - "makepad-zune-core", - "makepad-zune-inflate", + "zune-core", + "zune-inflate", ] [[package]] @@ -4347,7 +4323,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "ttf-parser" version = "0.21.1" -source = "git+https://github.com/makepad/makepad?branch=rik#c543a176cd3914495eeb33e3b729aeb0c949c6e4" +source = "git+https://github.com/makepad/makepad?branch=rik#5e5e260235ee0049aa1287f8f19c283d69c35db4" [[package]] name = "typenum" @@ -5275,3 +5251,27 @@ dependencies = [ "quote", "syn", ] + +[[package]] +name = "zune-core" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" + +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "zune-jpeg" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99a5bab8d7dedf81405c4bb1f2b83ea057643d9cb28778cea9eecddeedd2e028" +dependencies = [ + "zune-core", +] diff --git a/Cargo.toml b/Cargo.toml index de46ba3..b0fe90e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -215,4 +215,4 @@ collapsible_else_if = "allow" too_many_arguments = "allow" blocks_in_conditions = "allow" used_underscore_binding = "allow" -module_name_repetitions = "allow" \ No newline at end of file +module_name_repetitions = "allow" diff --git a/README.md b/README.md index 114cbf5..5a2702e 100644 --- a/README.md +++ b/README.md @@ -91,26 +91,28 @@ These are generally sorted in order of priority. If you're interested in helping - [x] View timeline of events in a single room - [x] Fetch and display room avatars - [x] Fetch user profiles (displayable names) +- [x] Cache user profiles and avatars +- [x] Cache fetched media on a per-room basis - [x] Fetch and display user profile avatars -- [x] Backwards pagination (upon viewing a room timeline) +- [x] Backwards pagination to view a room's older history - [x] Dynamic backwards pagination based on scroll position/movement: https://github.com/project-robius/robrix/issues/109 - [x] Loading animation while waiting for pagination request: https://github.com/project-robius/robrix/issues/109 -- [x] Stable positioning of events during simple timeline update -- [x] Stable positioning of events during complex/multi-part timeline update -- [x] Display simple text-only messages +- [x] Stable vertical position of events during timeline update +- [x] Display simple plaintext messages - [x] Display image messages (PNG, JPEG) -- [x] Rich text formatting for message bodies +- [x] HTML (rich text) formatting for message bodies - [x] Display reactions (annotations) - [x] Handle opening links on click - [x] Linkify plaintext hyperlinks -- [x] Reply previews above messages: https://github.com/project-robius/robrix/issues/82 -- [x] Send messages (standalone, no replies) +- [x] Show reply previews above messages: https://github.com/project-robius/robrix/issues/82 +- [x] Send standalone messages - [x] Interactive reaction button, send reactions: https://github.com/project-robius/robrix/issues/115 -- [x] Reply button, send reply: https://github.com/project-robius/robrix/issues/83 -- [ ] Re-spawn timeline as focused on an old event after a full timeline clear: https://github.com/project-robius/robrix/issues/103 -- [ ] Display multimedia (audio/video/gif) message events: https://github.com/project-robius/robrix/issues/120 -- [ ] Collapsible/expandable view of contiguous "small" events: https://github.com/project-robius/robrix/issues/118 +- [x] Show reply button, send reply: https://github.com/project-robius/robrix/issues/83 - [x] E2EE device verification, decrypt message content: https://github.com/project-robius/robrix/issues/116 +- [ ] Display multimedia (audio/video/gif) message events: https://github.com/project-robius/robrix/issues/120 +- [ ] Re-spawn timeline as focused on an old event after a full timeline clear: https://github.com/project-robius/robrix/issues/103 + + ### Auxiliary/admin features: login, registration, settings - [x] Persistence of app session to disk: https://github.com/project-robius/robrix/issues/112 @@ -118,6 +120,7 @@ These are generally sorted in order of priority. If you're interested in helping - [x] SSO, other 3rd-party auth providers login screen: https://github.com/project-robius/robrix/issues/114 - [x] Side panel showing detailed user profile info (click on their Avatar) - [x] Ignore and unignore users (see known issues) +- [ ] Collapsible/expandable view of contiguous "small" events: https://github.com/project-robius/robrix/issues/118 - [ ] User settings screen - [ ] Dedicated view of spaces - [ ] Dedicated view of direct messages (DMs): https://github.com/project-robius/robrix/issues/139 diff --git a/resources/icons/verification_no.svg b/resources/icons/verification_no.svg new file mode 100644 index 0000000..7059a30 --- /dev/null +++ b/resources/icons/verification_no.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/resources/icons/verification_unk.svg b/resources/icons/verification_unk.svg new file mode 100644 index 0000000..18b3e74 --- /dev/null +++ b/resources/icons/verification_unk.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/resources/icons/verification_yes.svg b/resources/icons/verification_yes.svg new file mode 100644 index 0000000..a5d0283 --- /dev/null +++ b/resources/icons/verification_yes.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/app.rs b/src/app.rs index f18a4ff..e4d97aa 100644 --- a/src/app.rs +++ b/src/app.rs @@ -9,15 +9,15 @@ use crate::{ }; live_design! { - import makepad_widgets::base::*; - import makepad_widgets::theme_desktop_dark::*; - import makepad_draw::shader::std::*; - - import crate::shared::styles::*; - import crate::home::home_screen::HomeScreen; - import crate::profile::my_profile_screen::MyProfileScreen; - import crate::verification_modal::VerificationModal; - import crate::login::login_screen::LoginScreen; + use link::theme::*; + use link::shaders::*; + use link::widgets::*; + + use crate::shared::styles::*; + use crate::home::home_screen::HomeScreen; + use crate::profile::my_profile_screen::MyProfileScreen; + use crate::verification_modal::VerificationModal; + use crate::login::login_screen::LoginScreen; ICON_CHAT = dep("crate://self/resources/icons/chat.svg") ICON_CONTACTS = dep("crate://self/resources/icons/contacts.svg") diff --git a/src/event_preview.rs b/src/event_preview.rs index deb55b3..005f6f2 100644 --- a/src/event_preview.rs +++ b/src/event_preview.rs @@ -151,7 +151,7 @@ pub fn text_preview_of_message( ), MessageType::Notice(notice) => format!("{}", if let Some(formatted_body) = notice.formatted.as_ref() { - &formatted_body.body + utils::trim_start_html_whitespace(&formatted_body.body) } else { ¬ice.body } @@ -162,11 +162,18 @@ pub fn text_preview_of_message( notice.body, ), MessageType::Text(text) => { - text.formatted.as_ref() - .and_then(|fb| (fb.format == MessageFormat::Html) - .then(|| utils::linkify(&fb.body).to_string()) + text.formatted + .as_ref() + .and_then(|fb| + (fb.format == MessageFormat::Html).then(|| + utils::linkify( + utils::trim_start_html_whitespace(&fb.body), + true, + ) + .to_string() + ) ) - .unwrap_or_else(|| utils::linkify(&text.body).to_string()) + .unwrap_or_else(|| utils::linkify(&text.body, false).to_string()) } MessageType::VerificationRequest(verification) => format!( "[Verification Request] to user {}", diff --git a/src/home/home_screen.rs b/src/home/home_screen.rs index 990506b..9995c2a 100644 --- a/src/home/home_screen.rs +++ b/src/home/home_screen.rs @@ -1,23 +1,23 @@ use makepad_widgets::*; live_design! { - import makepad_widgets::base::*; - import makepad_widgets::theme_desktop_dark::*; - import makepad_draw::shader::std::*; + use link::theme::*; + use link::shaders::*; + use link::widgets::*; - import crate::home::main_mobile_ui::MainMobileUI; - import crate::home::rooms_sidebar::RoomsSideBar; - import crate::home::spaces_dock::SpacesDock; - import crate::shared::styles::*; - import crate::shared::adaptive_view::AdaptiveView; - import crate::shared::search_bar::SearchBar; - import crate::home::main_desktop_ui::MainDesktopUI; + use crate::home::main_mobile_ui::MainMobileUI; + use crate::home::rooms_sidebar::RoomsSideBar; + use crate::home::spaces_dock::SpacesDock; + use crate::shared::styles::*; + use crate::shared::adaptive_view::AdaptiveView; + use crate::shared::search_bar::SearchBar; + use crate::home::main_desktop_ui::MainDesktopUI; NavigationWrapper = {{NavigationWrapper}} { view_stack = {} } - HomeScreen = { + pub HomeScreen = { Desktop = { show_bg: true draw_bg: { diff --git a/src/home/light_themed_dock.rs b/src/home/light_themed_dock.rs index 2dd60a4..fd324cb 100644 --- a/src/home/light_themed_dock.rs +++ b/src/home/light_themed_dock.rs @@ -1,13 +1,13 @@ use makepad_widgets::*; live_design! { - import makepad_widgets::base::*; - import makepad_widgets::theme_desktop_dark::*; - import makepad_draw::shader::std::*; + use link::theme::*; + use link::shaders::*; + use link::widgets::*; - import crate::shared::styles::*; + use crate::shared::styles::*; - Splitter = { + pub Splitter = { draw_splitter: { uniform border_radius: 1.0 uniform splitter_pad: 1.0 @@ -91,7 +91,7 @@ live_design! { } } - TabCloseButton = { + pub TabCloseButton = { // TODO: NEEDS FOCUS STATE height: 10.0, width: 10.0, margin: { right: (THEME_SPACE_2), left: -3.5 }, @@ -139,7 +139,7 @@ live_design! { } } - Tab = { + pub Tab = { width: Fit, height: Fill, //Fixed((THEME_TAB_HEIGHT)), align: {x: 0.0, y: 0.5} @@ -231,7 +231,7 @@ live_design! { } } - TabBar = { + pub TabBar = { CloseableTab = {closeable:true} PermanentTab = {closeable:false} @@ -256,7 +256,7 @@ live_design! { } } - Dock = { + pub Dock = { flow: Down, round_corner: { diff --git a/src/home/loading_modal.rs b/src/home/loading_modal.rs index 179909b..6855d92 100644 --- a/src/home/loading_modal.rs +++ b/src/home/loading_modal.rs @@ -4,14 +4,14 @@ use matrix_sdk::ruma::OwnedEventId; use crate::sliding_sync::TimelineRequestSender; live_design! { - import makepad_widgets::base::*; - import makepad_widgets::theme_desktop_dark::*; - import makepad_draw::shader::std::*; + use link::theme::*; + use link::shaders::*; + use link::widgets::*; - import crate::shared::styles::*; - import crate::shared::icon_button::RobrixIconButton; + use crate::shared::styles::*; + use crate::shared::icon_button::RobrixIconButton; - LoadingModal = {{LoadingModal}} { + pub LoadingModal = {{LoadingModal}} { width: Fit height: Fit @@ -159,7 +159,7 @@ impl WidgetMatchEvent for LoadingModal { .any(|a| matches!(a.downcast_ref(), Some(ModalAction::Dismissed))); if cancel_button.clicked(actions) || modal_dismissed { - log!("LoadingModal: close requested: {}", if modal_dismissed { "by modal dismiss" } else { "by cancel button" }); + // log!("LoadingModal: close requested: {}", if modal_dismissed { "by modal dismiss" } else { "by cancel button" }); if let LoadingModalState::BackwardsPaginateUntilEvent { target_event_id, request_sender, .. } = &self.state { let _did_send = request_sender.send_if_modified(|requests| { let initial_len = requests.len(); diff --git a/src/home/main_desktop_ui.rs b/src/home/main_desktop_ui.rs index 0ac48a2..e2717da 100644 --- a/src/home/main_desktop_ui.rs +++ b/src/home/main_desktop_ui.rs @@ -5,17 +5,17 @@ use crate::app::{AppState, SelectedRoom}; use super::room_screen::RoomScreenWidgetRefExt; live_design! { - import makepad_widgets::base::*; - import makepad_widgets::theme_desktop_dark::*; - import makepad_draw::shader::std::*; + use link::theme::*; + use link::shaders::*; + use link::widgets::*; - import crate::shared::styles::*; - import crate::home::light_themed_dock::*; - import crate::home::welcome_screen::WelcomeScreen; - import crate::home::rooms_sidebar::RoomsSideBar; - import crate::home::room_screen::RoomScreen; + use crate::shared::styles::*; + use crate::home::light_themed_dock::*; + use crate::home::welcome_screen::WelcomeScreen; + use crate::home::rooms_sidebar::RoomsSideBar; + use crate::home::room_screen::RoomScreen; - MainDesktopUI = {{MainDesktopUI}} { + pub MainDesktopUI = {{MainDesktopUI}} { dock = { width: Fill, height: Fill, diff --git a/src/home/main_mobile_ui.rs b/src/home/main_mobile_ui.rs index ea4b593..020ac6e 100644 --- a/src/home/main_mobile_ui.rs +++ b/src/home/main_mobile_ui.rs @@ -5,16 +5,15 @@ use crate::{ }; live_design! { - import makepad_widgets::base::*; - import makepad_widgets::theme_desktop_dark::*; - import makepad_draw::shader::std::*; + use link::theme::*; + use link::shaders::*; + use link::widgets::*; - import crate::shared::styles::*; + use crate::shared::styles::*; + use crate::home::room_screen::RoomScreen; + use crate::home::welcome_screen::WelcomeScreen; - import crate::home::room_screen::RoomScreen; - import crate::home::welcome_screen::WelcomeScreen; - - MainMobileUI = {{MainMobileUI}} { + pub MainMobileUI = {{MainMobileUI}} { width: Fill, height: Fill flow: Down, show_bg: true diff --git a/src/home/room_preview.rs b/src/home/room_preview.rs index a3ac713..c384703 100644 --- a/src/home/room_preview.rs +++ b/src/home/room_preview.rs @@ -12,16 +12,15 @@ use crate::{ use super::rooms_list::{RoomPreviewAvatar, RoomsListEntry}; live_design! { - import makepad_draw::shader::std::*; - import makepad_widgets::view::*; - import makepad_widgets::base::*; - import makepad_widgets::theme_desktop_dark::*; + use link::theme::*; + use link::shaders::*; + use link::widgets::*; - import crate::shared::styles::*; - import crate::shared::helpers::*; - import crate::shared::avatar::Avatar; - import crate::shared::adaptive_view::AdaptiveView; - import crate::shared::html_or_plaintext::HtmlOrPlaintext; + use crate::shared::styles::*; + use crate::shared::helpers::*; + use crate::shared::avatar::Avatar; + use crate::shared::adaptive_view::AdaptiveView; + use crate::shared::html_or_plaintext::HtmlOrPlaintext; RoomName =