Skip to content

Corrected few Kotlin style issues#20309

Merged
BrayanDSO merged 1 commit intoankidroid:mainfrom
singhrishiranjan:correct-style-issues
Feb 20, 2026
Merged

Corrected few Kotlin style issues#20309
BrayanDSO merged 1 commit intoankidroid:mainfrom
singhrishiranjan:correct-style-issues

Conversation

@singhrishiranjan
Copy link
Copy Markdown
Contributor

Purpose / Description

Cleanup: Fixed a few Kotlin style warnings given by Android Studio Inspection

Fixes

Approach

  1. Range check simplification
  2. Null-safety handling for view
  3. Substring API improvement

How Has This Been Tested?

Project built and ran successfully

Learning

This was my first ever contribution on GitHub. I learnt how one can quick fix some errors automatically through IDE.

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@singhrishiranjan singhrishiranjan marked this pull request as ready for review February 8, 2026 15:28
Copy link
Copy Markdown
Member

@lukstbit lukstbit left a comment

Choose a reason for hiding this comment

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

Thanks and welcome.
I left a request for a small change, the rest looks good.

Comment thread AnkiDroid/src/main/java/com/ichi2/anki/StudyOptionsFragment.kt
Copy link
Copy Markdown
Member

@lukstbit lukstbit left a comment

Choose a reason for hiding this comment

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

It would be useful if you could squash the two commits together, but other than that this looks good, thanks.

@lukstbit lukstbit added Needs Second Approval Has one approval, one more approval to merge squash-merge A squash & force push is required. The PR author may do this to speed up the merge process. labels Feb 9, 2026
@BrayanDSO BrayanDSO added this pull request to the merge queue Feb 20, 2026
@BrayanDSO BrayanDSO added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels Feb 20, 2026
Merged via the queue into ankidroid:main with commit 8c7cde7 Feb 20, 2026
15 checks passed
@github-actions github-actions Bot added this to the 2.24 release milestone Feb 20, 2026
@github-actions github-actions Bot removed Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) squash-merge A squash & force push is required. The PR author may do this to speed up the merge process. labels Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants