Skip to content

feat: Add events widgets on homepage#418

Draft
kdroidFilter wants to merge 19 commits intomasterfrom
feat/temple-destruction-countdown-widget
Draft

feat: Add events widgets on homepage#418
kdroidFilter wants to merge 19 commits intomasterfrom
feat/temple-destruction-countdown-widget

Conversation

@kdroidFilter
Copy link
Copy Markdown
Owner

@kdroidFilter kdroidFilter commented Apr 7, 2026

Summary

  • Add a new events widget system on the homepage below the zmanim widgets section
  • First widget: temple destruction countdown showing time elapsed since the destruction of the Second Beit HaMikdash (9 Av 3830)
  • Uses KosherJava Hebrew calendar with Jerusalem sunset-based day transition logic
  • Displays years, months, and days in transparent glass cards over a background image
  • Background image provided in 3 sizes (small/medium/large) for memory efficiency

Test plan

  • Verify widget displays correctly in dark mode
  • Verify widget displays correctly in light mode (should look same as dark)
  • Verify countdown values are accurate against Hebrew calendar
  • Verify widget only shows when zmanim widgets setting is enabled
  • Check memory usage with the optimized image sizes

Display a countdown since the destruction of the Second Beit HaMikdash
using KosherJava Hebrew calendar with Jerusalem sunset-based day logic.
Widget shows years, months, and days in glass cards over a background
image, placed below the zmanim widgets section.
@kdroidFilter kdroidFilter changed the title feat: Add temple destruction countdown event widget feat: Add events widgets on homepage Apr 7, 2026
@kdroidFilter kdroidFilter marked this pull request as draft April 7, 2026 15:11
- Removed redundant class arguments from `@ViewModelKey` annotations to streamline ViewModel definitions.
- Updated several dependencies in `libs.versions.toml` for improved functionality and compatibility.
…che handling

- Replaced `synchronized` blocks with `Mutex.withLock` for coroutine-friendly synchronization in cache operations.
- Switched to `Array.sort()` for sorting to simplify logic and remove unused `Arrays.parallelSort`.
…e lifecycle behavior

- Replaced phase-based logic with a continuous loop for cleaner animation flow.
- Transitioned to frame-based timing using `withFrameNanos` for smoother character animations.
- Optimized punctuation hold processing with a dedicated helper function.
- Integrated `LocalWindowInfo` to pause typing animation when window focus is lost.
…e memory efficiency

- Introduced `mutableIntStateOf` for efficient integer state management.
- Minimized substring allocations by maintaining visible length indices.
- Extracted shared `TextStyle` in `HomeView` to reduce recompositions.
- Adjusted formatting and spacing in `HomeTempleCountdownWidget` for consistency.
…riven clipping

Replace drawWithContent with graphicsLayer to avoid re-rendering text on every frame.
The text is now rendered once into a layer, and only the clip shape is updated per frame,
reducing CPU usage from 4% to 1.5-2.5% on i5-14600. Supports both LTR and RTL text.
…on delays

Cache the Outline instance in CachedRectShape to eliminate allocations per frame.
Increase typing/deleting delays to reduce update frequency: typing 120ms/char (8/sec),
deleting 55ms/char (18/sec). Combined with outline caching, reduces CPU usage further.
Replace CPU-based sphere rendering with SkSL shaders running on the GPU.
The sphere shader handles ray-sphere intersection, texture sampling,
Phong lighting, atmospheric glow, and shadow alpha entirely on GPU.
Orbit paths use Skia Path rendering, starfield is cached as a texture.
Falls back to CPU renderer if shader compilation fails.
…rame allocations

- Added caching for Earth and Moon shaders to avoid shader re-creation on every frame.
- Introduced pre-allocated `Paint`, `Path`, and buffer objects to eliminate redundant allocations.
- Simplified rendering logic by reusing shared resources and reducing object instantiation.
Revert bitmap reuse — asComposeImageBitmap wraps without copying,
so reusing the bitmap corrupted the previous frame still displayed
by Compose. Add @synchronized to render methods since the renderer
is a singleton shared across coroutines. Cache scene geometry.
This commit replaces the OSHI library with Nucleus SystemInfo for handling system information, simplifying code and improving maintainability. Redundant OSHI-specific ProGuard rules and dependencies (OSHI, KNotify) are removed, and related code is refactored to use Nucleus equivalents.
…n-widget' into feat/temple-destruction-countdown-widget

# Conflicts:
#	gradle/libs.versions.toml
Prevent laggy zoom when multiple tabs are open by only animating text size/line height on the active tab. Background tabs snap the values instantly (1 recomposition instead of ~18). When switching tabs, they show the correct size immediately without animation visible.

Implemented via CompositionLocal to avoid threading isSelected through all composables.
Introduce a `getAllBooksWithAltFlags` function in `CatalogCache` to merge alt-structure flags from the database into cached book data. Updates `NavigationUseCase` to utilize this new method, reducing redundant queries and copy operations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant