7da41a65ad
Add a resizable home-screen widget on iOS and Android showing recent
in-progress books with cover, reading progress, and tap-to-open.
- One responsive widget: Android resizable 1x1 to 4x3 (one book per
column, up to 3); iOS Small/Medium/Large families. Covers are cropped,
rounded, with a percent badge and a progress bar (baked into the bitmap
on Android, SwiftUI overlays on iOS).
- TTS controls (previous, play-pause, next) appear in 2+ row sizes when
TTS is active, wired to the existing media session. Reading progress
stays live during background TTS via a fraction computed from the baked
offline locations.
- Publishes a snapshot plus downsized cover thumbnails to the iOS App
Group and Android SharedPreferences through a new update_reading_widget
native-bridge command; refresh is debounced and driven by library and
progress changes, TTS, and app backgrounding.
- Tapping a cover opens readest://book/{hash}, switching the reader in
place when one is already open.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
50 lines
1.2 KiB
Rust
50 lines
1.2 KiB
Rust
const COMMANDS: &[&str] = &[
|
|
"auth_with_safari",
|
|
"auth_with_custom_tab",
|
|
"copy_uri_to_path",
|
|
"save_image_to_gallery",
|
|
"use_background_audio",
|
|
"install_package",
|
|
"set_system_ui_visibility",
|
|
"get_status_bar_height",
|
|
"get_sys_fonts_list",
|
|
"intercept_keys",
|
|
"lock_screen_orientation",
|
|
"iap_is_available",
|
|
"iap_initialize",
|
|
"iap_fetch_products",
|
|
"iap_purchase_product",
|
|
"iap_restore_purchases",
|
|
"get_system_color_scheme",
|
|
"get_safe_area_insets",
|
|
"get_screen_brightness",
|
|
"set_screen_brightness",
|
|
"get_external_sdcard_path",
|
|
"open_external_url",
|
|
"show_lookup_popover",
|
|
"get_lookup_dictionary",
|
|
"clear_lookup_dictionary",
|
|
"select_directory",
|
|
"get_storefront_region_code",
|
|
"register_listener",
|
|
"remove_listener",
|
|
"request_manage_storage_permission",
|
|
"check_permissions",
|
|
"request_permissions",
|
|
"checkPermissions",
|
|
"requestPermissions",
|
|
"clip_url",
|
|
"set_secure_item",
|
|
"get_secure_item",
|
|
"clear_secure_item",
|
|
"refresh_eink_screen",
|
|
"update_reading_widget",
|
|
];
|
|
|
|
fn main() {
|
|
tauri_plugin::Builder::new(COMMANDS)
|
|
.android_path("android")
|
|
.ios_path("ios")
|
|
.build();
|
|
}
|