Skip to content

Bugfix: set correct initial value for default schedule delay slider#376

Closed
dazewell wants to merge 1 commit into
risin42:devfrom
dazewell:bugfix/schedule_time_default_slider_position
Closed

Bugfix: set correct initial value for default schedule delay slider#376
dazewell wants to merge 1 commit into
risin42:devfrom
dazewell:bugfix/schedule_time_default_slider_position

Conversation

@dazewell
Copy link
Copy Markdown
Contributor

Repro

  1. open schedule message sheet
  2. set default schedule time to 1day
  3. close the schedule sheet
  4. open the schedule sheet
  5. notice the slider position

Expected

Slider is at the position of 1day

Actual

Slider is at the default position (~10 minutes)

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2c46ef5e-e8f3-4eac-9796-a0870d04ad50

📥 Commits

Reviewing files that changed from the base of the PR and between 918dd4e and 4d5286e.

📒 Files selected for processing (1)
  • TMessagesProj/src/main/java/tw/nekomimi/nekogram/helpers/ScheduleTimeHelper.java

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved schedule time slider initialization to properly display default time values.

Walkthrough

The ScheduleTimeHelper.addDefaultScheduleSlider method now defers setting SeekBar progress. The initial progress value is precomputed from the default step before view setup, then posted to the SeekBar after the delegate is configured, replacing immediate progress initialization.

Changes

SeekBar progress initialization timing

Layer / File(s) Summary
Deferred SeekBar progress initialization
TMessagesProj/src/main/java/tw/nekomimi/nekogram/helpers/ScheduleTimeHelper.java
Initial progress is calculated from the default step before SeekBarView creation. The progress is then deferred and applied via post() after the delegate is configured, replacing the prior immediate setProgress() call during setup.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing the initial value of the default schedule delay slider to display the correct position when reopened.
Description check ✅ Passed The description clearly documents a bug with the schedule slider not displaying the correct initial position, including reproduction steps, expected behavior, and actual behavior.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@risin42
Copy link
Copy Markdown
Owner

risin42 commented May 30, 2026

Fixed in 9635cf6. Thanks.

@risin42 risin42 closed this May 30, 2026
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.

2 participants