Skip to content

Feature/quick scheduled send#368

Closed
dazewell wants to merge 2 commits into
risin42:devfrom
dazewell:feature/quick_scheduled_send
Closed

Feature/quick scheduled send#368
dazewell wants to merge 2 commits into
risin42:devfrom
dazewell:feature/quick_scheduled_send

Conversation

@dazewell
Copy link
Copy Markdown
Contributor

@dazewell dazewell commented May 24, 2026

Quick Schedule Button

What

Follow-up to #366 (configurable default scheduled time). Once you have scheduled messages in a chat and start typing, the calendar icon stays visible. Tap it to schedule the message you are typing right now, no long-tap on the send button required.

Why

I usually use scheduled messages as a "review queue": reply to many people during the day, then review the whole bulk before it goes out. Might be useful for other people using scheduled messages when talking with their friends/relatives abroad with a different time zone as well. Default Telegram flow for this is painful:

  • Calendar icon only opens the list of already scheduled messages, not the picker for a new one.
  • Long-tap on the send button is the only way to schedule a new message, and that button sits right on the edge of the screen. On devices with curved edges it often does not register, and even when it does it feels slow.
  • A permanent "schedule" button in the input bar would clutter UI for everyone who never uses it.

This change solves all three: the button only appears when you already have at least one scheduled message in the chat, no fighting with the curved edge, and one tap instead of long-tap plus menu. The whole thing is behind a toggle that is off by default, so most folks will not notice any difference until they turn it on.

Next step would be improving the scheduled list itself, e.g. bulk send like in Telegram Desktop, but I wanted to start with smaller focused changes first. Easy select first+last+select between flow already implemented so it is already half-way there.

How

  • New opt-in setting QuickScheduleButton in Chat settings, off by default.
  • In ChatActivityEnterView, when the setting is on and the chat has scheduled messages, the calendar button stays visible while typing instead of being hidden.
  • Tap behavior is context-aware:
    • empty draft / editing a message / no scheduled messages yet: original behavior (opens the list);
    • non-empty draft with existing scheduled messages: opens the schedule-date picker and sends the typed text at chosen time.
  • Long-tap always opens the scheduled messages list, preserving the original affordance.

Notes

  • Edit-message flow is excluded from the quick-schedule path to avoid sending instead of editing.
  • Whitespace-only drafts are treated as empty.

Summary by CodeRabbit

  • New Features
    • Introduced Quick Schedule button feature in chat settings. When enabled, tapping the scheduled button opens the date picker for immediate message scheduling, streamlining the workflow. Button visibility and animations update dynamically based on feature state and message content.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 24, 2026

Walkthrough

This PR adds a quick schedule feature to Telegram's chat input. When enabled via settings, users can schedule messages using an always-visible calendar button with an inline date picker instead of navigating to a separate scheduled messages view. The feature is controlled by a new configuration flag and includes corresponding settings UI, interaction logic, and conditional visibility/animation handling for the scheduled button.

Changes

Quick Schedule Button Feature

Layer / File(s) Summary
Feature configuration and string resources
TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt, TMessagesProj/src/main/res/values/strings_nax.xml
New quickScheduleButton boolean config is added to NaConfig with default false and wired through the existing addConfig mechanism. Two new string resources (QuickScheduleButton and QuickScheduleButtonNotice) are added for UI labels.
Settings UI integration
TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoChatSettingsActivity.java
A new quickScheduleButtonRow ConfigCellTextCheck is added to the chat settings activity, wired to the quickScheduleButton config and its notice string resource.
Quick schedule interaction handler
TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java
Scheduled button click behavior conditionally opens a quick schedule date picker (calling sendMessageInternal with picked parameters) when the feature is enabled with valid preconditions; otherwise falls back to delegate.openScheduledMessages(). Long-press continues to open scheduled messages when a delegate is available.
Scheduled button visibility and animations
TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java
Scheduled button display logic computes keepScheduleVisible and keepScheduleVisibleInstant flags based on feature config and message state. When enabled, the button is created with full opacity/scale and translation animations; when disabled, it is hidden/faded and animated out. Animation-end visibility condition is tightened to respect the keep-visible flag, with parallel logic applied for both regular and instant scheduled message states.
🚥 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 'Feature/quick scheduled send' is directly related to the pull request's main objective of implementing a quick schedule feature that allows faster message scheduling.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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.

@dazewell
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 24, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8e3a31bc-2039-4562-938d-2fac3d8c7d79

📥 Commits

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

📒 Files selected for processing (4)
  • TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java
  • TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoChatSettingsActivity.java
  • TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt
  • TMessagesProj/src/main/res/values/strings_nax.xml

@dazewell dazewell marked this pull request as ready for review May 24, 2026 00:24
@risin42
Copy link
Copy Markdown
Owner

risin42 commented May 24, 2026

Thanks for working on this. For now, I don’t think we should expand this feature further. It may be very useful for your workflow, but it is likely a niche feature for most people.

We already have hundreds of features, so we must be very selective about adding new toggles and maintenance overhead. Also, ChatActivityEnterView is tricky because it is at the heart of the chat UI, so changes there easily lead to bugs and regressions.

Anyway, c7b0635 was my attempt to remove the toggle, keep the schedule button always there, and have tap for list, long press for sheet. But it still touches too much, so I'll probably just drop it.

@dazewell
Copy link
Copy Markdown
Contributor Author

I figured that could be the case but anyway wanted to give it a shot. Thanks for looking into it and trying another approach as well. Much appreciated! I'll keep it in my fork - that's totally fine.

@dazewell dazewell closed this May 24, 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