nextcloud / nextcloud/notes-android

When line starts with time code, new line should start with time code

Open
#1,508 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Upstream :: Markdown
Dominant language
Java
Stars
1.1k
Forks
168
Avg merge
1d 17h
Merged PRs (30d)
31

Description

This is both a bug and a feature request.

People use this app for writing medical diaries, for example when wearing a heart monitor for 72 hours or monitoring food intake after surgery. This may look something like this:

1330 walking
1445 running
1455 sitting, resting

Problem description

Every time you open the diary and add a new line, the last digit is stripped and the remaining number is incremented like so:

1455 sitting, resting
146.

This is counter-productive because now the user has to backspace 4 characters and start writing the actual time: 1500.

⚠️ 🐛 This is also a bug, because even if the user did write a list, 1456 comes after 1455, not 146.

Proposed solution
  • If military time (i.e. 0945) is detected, start the next line with the current time. For example, if it's now 13:32, the next line should start with 1332.
  • If the user did not write a period, the new line should not have a period.
The extra mile (don't read this)

Military time is used in live diaries for obvious reasons, but if the next line is automated anyway, you may as well detect any often used time-like start and auto-generate the next line in kind. E.g.:

0945
1332

09:45
13:32

9:45 AM
1:32 PM

Alternatives
  1. Do nothing when 4 digits are detected, in stead of writing a 3 digit number.
  2. Increment the whole number, not just the first 3 digits.
  3. When the number on the current line purposely does not end with a period (.), the number on the new line should also not end with a period.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named in the issue. Start by locating the Android note editor logic that creates a new line from the previous line, then compare its behavior with the military-time examples and proposed alternatives. Done means the chosen behavior is implemented consistently for time-prefixed lines without adding an unintended period.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.