Skip to content

Android: toValidMinuteInterval returns 30 unconditionally, preventing other minute intervals #10094

Description

@strannikhead

Summary:
The Android version utilizes the toValidMinuteInterval function (located in app/utils/datetime.ts). Consequently, any attempt to set a different interval (e.g., 10 minutes) results in the step defaulting to 30 minutes, which is unexpected behavior for Android-specific code.

File / Link:
https://github.com/mattermost/mattermost-mobile/blob/main/app/utils/datetime.ts#L13-L24

Environment:

  • Mattermost mobile app version: Latest (2.43.0)
  • OS: Android

Reproduction:

  1. Open an interactive dialog containing a date-time picker.
  2. When attempting to set the time, it resets to the nearest 30-minute interval.

Observed behavior:

  • On Android, the minute selection interval is always 30 (the function unconditionally returns 30 if Platform.OS !== 'ios'), preventing the use of other intervals and making it impossible to select other values.

Expected behavior:

  • The ability to select a time that is a multiple of the specified interval.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions