324bb8a366
Add a bindable "Refresh Page" action to Settings > Behavior > Page Turner that triggers a deep e-ink full refresh (GC16) to clear screen ghosting, gated to e-ink mode on Android. It reuses the existing hardware page-turner key-binding machinery: a new 'refresh' slot in HardwarePageTurnerSettings, shown only when isAndroidApp and the e-ink view setting is on. Pressing the bound key calls a new native bridge command instead of paginating. The native side is device-agnostic: EinkRefreshController probes each vendor mechanism via reflection and stops at the first that works, covering Onyx BOOX (Qualcomm View.refreshScreen), Tolino/Nook (NTX postInvalidateDelayed) and Boyue-style Rockchip (requestEpdMode) without bundling any vendor SDK. A success:false result is a soft no-op on non-e-ink hardware. iOS gets a stub. Verified on an Onyx BOOX Leaf5: the Onyx path fires and performs a visible full GC16 refresh. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
49 lines
1.2 KiB
Rust
49 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",
|
|
];
|
|
|
|
fn main() {
|
|
tauri_plugin::Builder::new(COMMANDS)
|
|
.android_path("android")
|
|
.ios_path("ios")
|
|
.build();
|
|
}
|