Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add bedtime lullaby #25

Closed
wants to merge 73 commits into from
Closed

add bedtime lullaby #25

wants to merge 73 commits into from

Conversation

Nilsu11
Copy link
Contributor

@Nilsu11 Nilsu11 commented May 7, 2024

A try for making a sleep timer. It is easier to let one try than explaining it.
For short: I tried to add the google clock sleep timer at first, but ended up deleting the activity.

Also merging my old fork made a mess, in reality there just are a few changes to some files. In April should be the first commit which truly matters.

qw123wh and others added 30 commits March 10, 2024 09:54
- Add three-dot menu so deletion is more obvious
- New error icon
- Delete unused drawable
- Used when editing the alarm title or when searching for a city
- The clock is displayed on the left side of the screen in landscape mode, and its size is optimized for both tablets and phones;
- Increase the size of the analog clock a little in portrait mode;
- Delete unnecessary code and file;
- When returning from settings, the cities list would keep the old style until it's force-refreshed when the next minute passes;
- Force an immediate change in onResume() by calling the citiesChanged() method;
- (android.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS)
- Add the "tools" namespace declaration so that the layout can be viewed correctly in Android Studio;
- Adjust some text colors;
- Delete unnecessary columns and rows in xml layout files;
- Delete preemptive dismiss button and "hairline" view;
- Delete unnecessary code;
- These two are currently not called anyway:
  * SCREEN_ON: would have to be explicitly registered, currently not even implicitly called
  * DATE_CHANGED: Not sure what does the trick instead, but it's currently not called and we get the correct date anyway (tested by setting time to 23:59 and observing the widget)
- Delete unused files;
- Delete unused functions;
- Delete unused import;
- Delete unused strings;
- Delete unused fractions;
- Delete unused "android:id" in layout files;
- Add some "tools:ignore";
- Add some "@SuppressLint()";
- Update strings to have screensaver title translated in settings;
- Delete unnecessary file;
- Caused by AlarmTimeClickHandler.saveInstance() which seems unnecessary
- The application reopens on the bedtime tab when the notification is clicked;
- Don't display the empty view of bedtime if an alarm has already been created;
- Fix lint warnings about bedtime notifications;
- The application reopens on the correct tab if the application is closed and the stopwatch, timer or bedtime notification is clicked;
@BlackyHawky
Copy link
Owner

I don't doubt that your proposal is interesting, but I'm really sorry, your PR is a bit of a mess... 73 commits for a single modification request is way too much to analyze especially since most of the commits concern my own modifications mixed with yours.

Please, update your main branch from mine or even clone the project again; create a new branch from your main branch dedicated to you modification and repropose your PR.

Let me remind you again: one PR = one modification, just to make things clearer.

In any case, I'll give it a try in the next days, as I'm very interested in improving the bedtime mode.

@Nilsu11
Copy link
Contributor Author

Nilsu11 commented May 7, 2024

Yes, this time I did it. As I mentioned at the beginning ifyou look at the changed files you can see, that they don't correspond the 73 commits.

Anyway it still is just a draft and not ready for review jet. I just wanted to have one so I don't forget to fix stuff and since I didn't want to trouble you I left this pull request as a draft.

Just for the future, I open draft pull request relatively early when my feature clearly isn't structured and WIP.

Also DO NOT JET give it a try since this is still WIP and will stay so till at least next Sunday. I will message you if I think it is in at least beta stage and the sleeptimer itself works reliable (I noticed now it is still up to chance).

@BlackyHawky
Copy link
Owner

OK ok. Take your time working on it and thanks for working on it.

Let me know when I can start testing.

If you can, take the opportunity to make a new PR without all those useless commits appearing.
I won't be making any more changes for a while unless someone reports a major problem with the application.

@Nilsu11
Copy link
Contributor Author

Nilsu11 commented Jun 1, 2024

I (somehow) can't stop the service when timed (the notification can) and don't know how to. I'll leave this to someone else and provide my work as base. Also I notice, that one jet can't decide the length of the sleep timer. to do this copy the code from the other spinner and adapt it.

@Nilsu11 Nilsu11 closed this Jun 1, 2024
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.

None yet

3 participants