Compare commits

...

2011 Commits

Author SHA1 Message Date
2b24759d6f Merge pull request #2209 from MihanEntalpo/automatic-backup-to-public-folder
Automatic backup to public folder
2025-09-14 19:42:41 -05:00
46f6d297d7 Merge branch 'fix/setting-screen-ui-improvement' into dev 2025-09-14 19:29:45 -05:00
543be48cb1 Merge branch 'style/newlines' into dev 2025-09-14 18:47:18 -05:00
297a381e67 Merge branch 'archiveFromStatisticsPage' into dev 2025-09-14 18:25:17 -05:00
542750207e Show message after archiving/unarchiving habits 2025-09-14 18:24:35 -05:00
46a3b69971 Disable GitHub Actions 2025-09-14 18:02:48 -05:00
Uladzislau Petrushkevich
9509b9e7af Settings-Fix-UI: Improve ripple effect on pure-dark mode and process navigation bar insets on Settings screen 2025-09-11 23:05:38 +02:00
mihanentalpo
7a04abc8e5 Automatic public backup: Fixed for the ktlint 2025-08-24 22:14:45 +07:00
mihanentalpo
b7a7d5f076 Automatic public backup: Translation to all the languages 2025-08-24 21:56:25 +07:00
mihanentalpo
08a71b071c Automatic public backup: Tests for AutoBackup to public folder 2025-08-24 21:56:11 +07:00
mihanentalpo
403d1058aa Automatic public backup: Implementation of SAF for AutoBackup 2025-08-24 21:55:58 +07:00
5aa8744ef4 Update copyright notices 2025-08-13 21:50:06 -05:00
ce4879ac2b Merge branch 'master' into dev 2025-08-13 21:30:57 -05:00
516bf394f8 Merge branch 'release/2.3.1' 2025-08-13 21:30:11 -05:00
5fe9704c36 Merge branch 'release/2.3.1' into dev 2025-08-13 21:29:41 -05:00
2816b7c3d0 Bump version to 2.3.1 and update changelog 2025-08-13 21:08:29 -05:00
KyleSCraig
0a4086ec8c Added archive and unarchive to the habit statistics page, visibility based on current state. 2025-08-01 16:00:20 +10:00
a9acbd6cab HabitCardListView: Prevent duplicate inset decorations 2025-07-08 21:28:54 -05:00
e121f46b61 Confetti: Fix position in freeform and landscape modes 2025-07-08 21:17:23 -05:00
d57de9d10c Apply bottom insets to about and settings screens 2025-07-08 21:01:35 -05:00
e4348a2144 Prevent some views from being obscured by system UI
Fixes #2171
2025-07-08 20:51:21 -05:00
e608c6ea62 Trim unit labels when necessary 2025-06-28 19:27:17 -05:00
5403b6bd51 CheckmarkWidgetViewTest: Ignore non-deterministic test case 2025-06-28 18:33:47 -05:00
a6cf43dbca Reformat source code 2025-06-28 16:05:43 -05:00
074627f6e1 Disable confetti if animations are disabled globally
Fixes #2170
2025-06-28 16:04:07 -05:00
powerjungle
96e20f751f Fix(UI): X and ? symbols easier to distinguish in "pure black" dark mode
In addition to that, make "progress ring" a bit more visible.
2025-06-25 22:30:21 -05:00
0daa4f6a2f Format source code 2025-06-25 22:20:58 -05:00
035b392ece CSV export: Use formatted values, add notes & header 2025-06-25 22:12:02 -05:00
648c7277cf CSV export: Add more fields to Habits.csv 2025-06-25 21:48:31 -05:00
5006f5128b Update JVM target and toolchain to version 17 2025-06-25 21:00:24 -05:00
97b98a872d EmptyListViewTest: Ignore non-deterministic test failures 2025-06-24 22:22:14 -05:00
862a851e1c EmptyListViewTest: Remove unused imports 2025-06-24 22:13:08 -05:00
804030f5c0 EmptyListViewTest: Instantiate view within each test method 2025-06-24 22:10:36 -05:00
08ab3c22ce Merge branch 'master' into dev 2025-06-24 21:37:32 -05:00
b58f836d8e Merge branch 'release/2.3.0' into dev 2025-06-24 21:28:24 -05:00
9ed4630f9b Merge branch 'release/2.3.0' 2025-06-24 21:25:14 -05:00
70dab74528 Bump version to 2.3.0 and update changelog 2025-06-23 22:23:55 -05:00
7e5d2fa207 Update Gradle and AGP versions to 8.11.1 and 8.9.2 2025-06-23 21:48:00 -05:00
0e432fb332 HistoryWidget: Increase padding; update widget images 2025-06-23 21:47:47 -05:00
powerjungle
c987144f4a style: allow adding newlines in the "Name" field
Since habit names are already shown with 2 lines in the main view,
it makes sense to allow an user to add newlines to the names.
This opens up the possibility for having better formatted text
for the habit name.
As suggested by another user, having markdown support would also
be a good addition at some point.
2025-04-12 20:00:53 +02:00
897a236501 Widgets: Update test images 2025-03-23 19:41:31 -05:00
0cccecec77 Widgets: Update test images 2025-03-23 19:27:12 -05:00
f1ed875256 Further increase widget corner radius to match current Android style 2025-03-23 17:10:39 -05:00
e82bd47aab Increase minimum widget size to 50x50 and 100x100
Some Samsung phones were allowing graph widgets to occupy 1x2 or
2x1 grid cells, leading to very small text. This commit bumps up
the minimum widget size to 100x100 to ensure they always occupy at
least 2x2 cells. Tested on Pixel 4, Pixel 7 and Samsung Galaxy S24.

Closes #2118
2025-03-23 16:52:23 -05:00
e9517f7378 Bump targetSdk to 36 2025-03-23 07:22:36 -05:00
12cc70a51a Confetti: Always emit from checkmark, not popup button 2025-03-23 07:06:45 -05:00
fa670b19b7 HabitCardView: Fix confetti position in API 36+ 2025-03-22 23:03:59 -05:00
45b100aad9 build.sh: Make output dir 2025-03-22 15:26:28 -05:00
3c0c0b77ff build.sh: Update emulator path 2025-03-22 15:19:37 -05:00
66fa56ea62 Merge branch 'improve-gradle' into dev 2025-03-21 22:16:29 -05:00
951dabea8b Merge branch 'isse_1857_reset_measurable_entry' into dev 2025-03-21 21:41:55 -05:00
76b9dd8bd9 Checkmark popup: Minor changes to layout 2025-03-21 21:41:23 -05:00
f68510f860 Allow user to disable confetti animation 2025-03-21 21:29:49 -05:00
245b0eb4d6 Update translators 2025-03-21 21:05:17 -05:00
4a0599fce4 Update translations from Crowdin 2025-03-21 21:01:54 -05:00
abbfe87260 gradle: Remove deleted module 2025-03-21 21:01:39 -05:00
3330014fa9 Remove unused project dirs (uhabits-core-legacy, uhabits-ios, etc) 2025-03-21 20:38:12 -05:00
kalina559
cc720e3dcb Removed an unnecessary change 2025-02-18 23:19:20 +01:00
kalina559
6e3d06cff9 Corrected formatting in the layout file 2025-02-18 22:32:48 +01:00
kalina559
d458cbd47a COrrected formatting 2025-02-18 20:51:16 +01:00
kalina559
74ce269446 Added 'UNKNOWN' button for measurable habits 2025-02-18 20:47:12 +01:00
Jimly Asshiddiqy
9eb8624863 Migrate to KSP 2025-02-17 09:56:21 +07:00
Jimly Asshiddiqy
c4bc301fb2 Implement version catalog 2025-02-14 16:56:04 +07:00
Chris Smowton
107c898f51 Add repository now required for old kotlin-css-jvm versions
Gradle Plugin Portal was previously making kotlin-css-jvm 1.0.0-pre.148-kotlin-1.4.30 available by virtue of mirroring JCenter. Now that Gradle have stopped doing that in preparation for JCenter to go away, we need to retrieve the old version from a different repository.

If this is bumped forwards to Kotlin 1.5.0+ it will become possible to get the package from Central instead.
2025-02-08 22:11:53 -06:00
Abdul Majeed
4a7d7ef490 Added Streaks info for numeric habits 2025-02-08 22:07:28 -06:00
Abdul Majeed
13ecc2a386 Added Streaks info for numeric habits 2025-02-08 22:07:28 -06:00
Jakub Kalinowski
2296a49999 Corrected HabitTest 2025-02-08 21:58:41 -06:00
Jakub Kalinowski
303020a8c0 Never mark AT_MOST habits as completed for today 2025-02-08 21:58:41 -06:00
Jakub Kalinowski
37219cb13f Ignoring isCompleted for AT_MOST habits 2025-02-08 21:56:17 -06:00
CM
62d9d29e91 [Fix] Markdown linter problems (#2084)
* MD024

* MD033

* MD034

* MD036

* MD040

* MD045

* MD046

---------

Co-authored-by: MacroController <anonymous@github.com>
2025-02-08 21:48:23 -06:00
451b536e71 Upgrade dependencies 2025-02-08 21:37:16 -06:00
14dbf90c23 Upgrade Kotlin, AGP 2025-02-08 21:12:11 -06:00
280a5ddceb Bump targedSdk to 35 2025-02-08 20:58:23 -06:00
22331ed364 Remove dependabot 2025-02-08 07:43:10 -06:00
d0a45eb523 Merge pull request #2028 from getgo-nobugs/dev
Fix the misalignment of "About" page in RTL language
2025-02-08 07:38:03 -06:00
getgo-nobugs
fec73af665 Update styles.xml 2024-07-28 11:16:23 +08:00
fc9cc423d0 Multiple fixes to edge-to-edge display (API 35) 2024-05-20 20:30:09 -05:00
e7165d993f Make compatible with edge-to-edge (API 35) 2024-05-20 09:33:00 -05:00
732ec1c70a Update AGP; disable lint 2024-05-19 20:36:43 -05:00
e823cd5758 Update lint-baseline 2024-05-19 20:01:32 -05:00
46fe683d71 Merge pull request #1942 from foralost/#1941_DateUtilsTest_failing
#1941 DateUtils test fix
2024-04-04 22:03:46 -05:00
7f6248123c DateUtilsTest: Simplify getCalendarUTC 2024-04-04 21:55:01 -05:00
2024277ebe Merge branch 'dev' into #1941_DateUtilsTest_failing 2024-04-04 21:52:27 -05:00
c216fb01d6 Merge pull request #1785 from hiqua/android_lint_baseline
Check android lint violations against current baseline
2024-04-04 21:45:37 -05:00
7cb32f486b lint: disable GradleDependency 2024-04-04 21:36:51 -05:00
093591fbaf Update lint baseline 2024-04-04 21:24:09 -05:00
985234cdf3 Merge branch 'dev' into android_lint_baseline 2024-04-04 21:18:22 -05:00
06090e238a Merge branch 'feature/konfetti' into dev 2024-04-02 19:51:59 -05:00
e48452f724 Move showConfetti to ListHabitsScreen; use button location; other tweaks 2024-04-02 19:34:00 -05:00
dependabot[bot]
936986e110 Bump daggerVersion from 2.50 to 2.51.1
Bumps `daggerVersion` from 2.50 to 2.51.1.

Updates `com.google.dagger:dagger` from 2.50 to 2.51.1
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.50...dagger-2.51.1)

Updates `com.google.dagger:dagger-compiler` from 2.50 to 2.51.1
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.50...dagger-2.51.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-02 22:04:24 +02:00
dependabot[bot]
4b3910aea8 Bump com.google.guava:guava from 33.0.0-android to 33.1.0-android
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.0.0-android to 33.1.0-android.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 18:11:48 +02:00
foralost
10074ded32 UTC Calendar fix 2024-03-04 11:31:45 +01:00
Gokul K
1280e798d2 rendering only if layout and konfetti view exists - to avoid null reference errors 2024-02-03 23:14:58 -06:00
Gokul K
b09306e793 fixing another lint error 2024-02-03 23:14:58 -06:00
Gokul K
e30636a447 fixed ktlint erorrs and is building successfully now 2024-02-03 23:14:58 -06:00
Gokul K
ad8738180c fixing some comments from @hiqua 2024-02-03 23:14:58 -06:00
Gokul K
08410c59d0 introducing confetti animation using konfetti library 2024-02-03 23:14:58 -06:00
Manish Kumar Verma
ab86cee70b Fix: No notification when goal type is set to "maximum" (#1931) 2024-02-02 19:21:40 -06:00
dependabot[bot]
3a0603605b Bump androidx.annotation:annotation from 1.7.0 to 1.7.1
Bumps androidx.annotation:annotation from 1.7.0 to 1.7.1.

---
updated-dependencies:
- dependency-name: androidx.annotation:annotation
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 04:43:18 -06:00
dependabot[bot]
6a78b4d853 Bump daggerVersion from 2.48.1 to 2.50 (#1907)
Bumps `daggerVersion` from 2.48.1 to 2.50.

Updates `com.google.dagger:dagger` from 2.48.1 to 2.50
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.48.1...dagger-2.50)

Updates `com.google.dagger:dagger-compiler` from 2.48.1 to 2.50
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.48.1...dagger-2.50)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 04:34:40 -06:00
dependabot[bot]
fe43b1435d Bump ch.qos.logback:logback-classic from 1.4.13 to 1.4.14 (#1905)
Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.4.13 to 1.4.14.
- [Commits](https://github.com/qos-ch/logback/compare/v_1.4.13...v_1.4.14)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 04:33:18 -06:00
dependabot[bot]
12503b8a6d Bump com.google.guava:guava from 32.1.3-android to 33.0.0-android (#1902)
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.1.3-android to 33.0.0-android.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 04:33:03 -06:00
dependabot[bot]
ef7f78bff0 Bump org.xerial:sqlite-jdbc from 3.42.0.0 to 3.45.1.0 (#1929)
Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.42.0.0 to 3.45.1.0.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.42.0.0...3.45.1.0)

---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 04:32:43 -06:00
dependabot[bot]
53c208ded5 Bump com.google.android.material:material from 1.10.0 to 1.11.0 (#1908)
Bumps [com.google.android.material:material](https://github.com/material-components/material-components-android) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/material-components/material-components-android/releases)
- [Commits](https://github.com/material-components/material-components-android/compare/1.10.0...1.11.0)

---
updated-dependencies:
- dependency-name: com.google.android.material:material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 04:32:23 -06:00
dependabot[bot]
1bdc83e92f Bump org.mockito.kotlin:mockito-kotlin from 5.1.0 to 5.2.1 (#1906)
Bumps [org.mockito.kotlin:mockito-kotlin](https://github.com/mockito/mockito-kotlin) from 5.1.0 to 5.2.1.
- [Release notes](https://github.com/mockito/mockito-kotlin/releases)
- [Commits](https://github.com/mockito/mockito-kotlin/compare/5.1.0...5.2.1)

---
updated-dependencies:
- dependency-name: org.mockito.kotlin:mockito-kotlin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 04:32:08 -06:00
dependabot[bot]
680c1cdc76 Bump kotlinVersion from 1.9.21 to 1.9.22 (#1904)
Bumps `kotlinVersion` from 1.9.21 to 1.9.22.

Updates `org.jetbrains.kotlin.android` from 1.9.21 to 1.9.22

Updates `org.jetbrains.kotlin.kapt` from 1.9.21 to 1.9.22

Updates `org.jetbrains.kotlin.multiplatform` from 1.9.21 to 1.9.22

Updates `org.jetbrains.kotlin:kotlin-stdlib-jdk8` from 1.9.21 to 1.9.22
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.9.21...v1.9.22)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin.android
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin.kapt
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin.multiplatform
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 04:31:50 -06:00
dependabot[bot]
80916bac50 Bump actions/upload-artifact from 3 to 4 (#1901)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 04:31:37 -06:00
Leon Todd
a5e3e9b3cf Unset measurable habits (#1899) 2024-01-30 19:42:53 -06:00
248ba50a8e Reformat source code 2024-01-30 19:38:32 -06:00
Andreas Gebhardt
45a82b3c2d Changed Checkmark Widget Color on implicit check
As proposed in #615, the background is now solid color on implicit check but has a stroked checkmark instead of a full one.
2024-01-30 19:25:57 -06:00
770d1293dc Merge branch 'master' into dev 2024-01-30 19:15:48 -06:00
d10538e720 Merge branch 'release/2.2.0' 2024-01-30 19:15:12 -06:00
02e9e2384e Update CHANGELOG 2024-01-30 19:09:22 -06:00
Serhii K
b627ff4413 Use colorBackground property instead of splash screen lib 2024-01-30 19:06:43 -06:00
Serhii K
0683ea43f4 Fix splash screen background color in dark mode 2024-01-30 19:06:43 -06:00
08f77a5cae Merge branch 'master' into release/2.2.0 2023-12-01 18:31:53 -06:00
27df792775 Update CHANGELOG 2023-12-01 18:29:34 -06:00
Leonard Dizon
800f92f255 Create locales_config.xml for per-app language 2023-12-01 18:14:06 -06:00
dependabot[bot]
e06ed3ed7d Bump ch.qos.logback:logback-classic from 1.4.11 to 1.4.13 (#1882)
Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.4.11 to 1.4.13.
- [Commits](https://github.com/qos-ch/logback/compare/v_1.4.11...v_1.4.13)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-01 18:08:31 -06:00
dependabot[bot]
3bb119c6ed Bump com.github.triplet.play from 3.8.4 to 3.8.6 (#1879)
Bumps com.github.triplet.play from 3.8.4 to 3.8.6.

---
updated-dependencies:
- dependency-name: com.github.triplet.play
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-01 18:08:05 -06:00
dependabot[bot]
0762699a86 Bump org.apache.commons:commons-lang3 from 3.13.0 to 3.14.0 (#1881)
Bumps org.apache.commons:commons-lang3 from 3.13.0 to 3.14.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-lang3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-01 18:07:26 -06:00
dependabot[bot]
8837326d44 Bump com.opencsv:opencsv from 5.8 to 5.9 (#1880)
Bumps com.opencsv:opencsv from 5.8 to 5.9.

---
updated-dependencies:
- dependency-name: com.opencsv:opencsv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-01 18:07:17 -06:00
dependabot[bot]
481a3d5784 Bump org.junit.jupiter:junit-jupiter from 5.10.0 to 5.10.1 (#1878)
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.0 to 5.10.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-01 18:07:03 -06:00
8eff782f54 Update dependencies 2023-11-29 20:07:45 -06:00
c590734c42 Update dependencies 2023-11-29 19:54:00 -06:00
7e7f68282b Update Kotlin 2023-11-29 19:38:21 -06:00
4bd5cee17b Update libraries 2023-11-29 19:30:32 -06:00
b2421dc8b1 GH Actions: Increase number of attempts 2023-11-27 20:57:43 -06:00
93363bff96 GH Actions: Add API 34 2023-11-27 20:57:14 -06:00
d01044b203 GH Actions: Add API 34 2023-11-27 20:47:48 -06:00
70fe513e52 Bump targetSdk to 34 2023-11-27 20:43:34 -06:00
dee93fde8f Upgrade to AGP 8.1.4 2023-11-27 19:46:54 -06:00
f0ce05e06e API 34: Implement workaround to keep sticky notifications non-dismissible 2023-11-25 15:42:04 -06:00
4975ba2752 Add permission: USE_EXACT_ALARM 2023-11-25 15:30:29 -06:00
ed8c60e52f Implement runtime notification permission; bump targetSdk to 33 2023-11-25 07:12:16 -06:00
dependabot[bot]
7735247521 Bump daggerVersion from 2.48 to 2.48.1
Bumps `daggerVersion` from 2.48 to 2.48.1.

Updates `com.google.dagger:dagger` from 2.48 to 2.48.1
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.48...dagger-2.48.1)

Updates `com.google.dagger:dagger-compiler` from 2.48 to 2.48.1
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.48...dagger-2.48.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 16:07:22 +01:00
dependabot[bot]
b32a6ad1b8 Bump org.jlleitschuh.gradle.ktlint from 11.5.1 to 11.6.0
Bumps org.jlleitschuh.gradle.ktlint from 11.5.1 to 11.6.0.

---
updated-dependencies:
- dependency-name: org.jlleitschuh.gradle.ktlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 14:18:03 +02:00
dependabot[bot]
21a512ae71 Bump androidx.annotation:annotation from 1.6.0 to 1.7.0
Bumps androidx.annotation:annotation from 1.6.0 to 1.7.0.

---
updated-dependencies:
- dependency-name: androidx.annotation:annotation
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 14:17:41 +02:00
dependabot[bot]
b0944d3f1c Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 14:17:26 +02:00
dependabot[bot]
8a9b719c50 Bump org.mockito.kotlin:mockito-kotlin from 2.2.11 to 5.1.0
Bumps [org.mockito.kotlin:mockito-kotlin](https://github.com/mockito/mockito-kotlin) from 2.2.11 to 5.1.0.
- [Release notes](https://github.com/mockito/mockito-kotlin/releases)
- [Commits](https://github.com/mockito/mockito-kotlin/compare/2.2.11...5.1.0)

---
updated-dependencies:
- dependency-name: org.mockito.kotlin:mockito-kotlin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-20 22:04:01 +02:00
Quentin Hibon
ef7454ae75 Bump kotlin from 1.7.21 to 1.8.20 2023-09-20 21:04:38 +02:00
Quentin Hibon
b51f6abfce Target JVM 17 in uhabits-server 2023-09-20 21:04:38 +02:00
Quentin Hibon
a013635224 Bump mockito-kotlin from 4.1.0 to 5.0.0 2023-09-20 21:04:38 +02:00
Quentin Hibon
a9f028a34b Target JVM 11 2023-09-20 21:04:38 +02:00
Quentin Hibon
3b0fba12f5 Remove unused imports in datetimepicker 2023-09-20 21:04:38 +02:00
Quentin Hibon
4139f09fb7 Add @Deprecated when overriding @Deprecated methods 2023-09-20 21:04:38 +02:00
Quentin Hibon
248ff2ec62 Bump mockito-kotlin from 2.2.11 to 4.1.0 in -server 2023-09-20 21:04:38 +02:00
dependabot[bot]
cc7178eb21 Bump daggerVersion from 2.47 to 2.48
Bumps `daggerVersion` from 2.47 to 2.48.

Updates `com.google.dagger:dagger` from 2.47 to 2.48
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.47...dagger-2.48)

Updates `com.google.dagger:dagger-compiler` from 2.47 to 2.48
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.47...dagger-2.48)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 14:47:47 +02:00
6116ef9450 Merge branch 'hotfix/2.1.3' 2023-08-28 05:51:08 -05:00
8801960615 Update CHANGELOG 2023-08-28 05:43:12 -05:00
b0a4284b66 NumberDialog: Use text input on Samsung devices
Fixes #1719
2023-08-28 05:36:59 -05:00
Felix Schlegel
334dabb407 Use default locale instead of hardcoded US locale (#1763) 2023-08-18 18:35:54 +02:00
dependabot[bot]
b2fc79a3ab Bump com.github.triplet.play from 3.7.0 to 3.8.4
Bumps com.github.triplet.play from 3.7.0 to 3.8.4.

---
updated-dependencies:
- dependency-name: com.github.triplet.play
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 22:56:02 +02:00
dependabot[bot]
f0e8643e6b Bump com.google.android.material:material from 1.8.0 to 1.9.0
Bumps [com.google.android.material:material](https://github.com/material-components/material-components-android) from 1.8.0 to 1.9.0.
- [Release notes](https://github.com/material-components/material-components-android/releases)
- [Commits](https://github.com/material-components/material-components-android/compare/1.8.0...1.9.0)

---
updated-dependencies:
- dependency-name: com.google.android.material:material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 21:30:23 +02:00
dependabot[bot]
5cd616f967 Bump org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm
Bumps [org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.4 to 1.7.3.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.4...1.7.3)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 21:14:34 +02:00
dependabot[bot]
b53ef758ec Bump ch.qos.logback:logback-classic from 1.4.5 to 1.4.9
Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.4.5 to 1.4.9.
- [Commits](https://github.com/qos-ch/logback/compare/v_1.4.5...v_1.4.9)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 21:00:20 +02:00
dependabot[bot]
5add03bf23 Bump org.junit.jupiter:junit-jupiter from 5.8.1 to 5.10.0
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.8.1 to 5.10.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.8.1...r5.10.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 20:04:53 +02:00
Quentin Hibon
b465ee588b Update dependabot.yml
Increase PR limit from 5 (default) to 10 for gradle
2023-08-08 19:48:04 +02:00
dependabot[bot]
b9253d41ea Bump daggerVersion from 2.46 to 2.47
Bumps `daggerVersion` from 2.46 to 2.47.

Updates `com.google.dagger:dagger` from 2.46 to 2.47
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.46...dagger-2.47)

Updates `com.google.dagger:dagger-compiler` from 2.46 to 2.47
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.46...dagger-2.47)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 19:45:56 +02:00
dependabot[bot]
ca0a9dd85f Bump org.xerial:sqlite-jdbc from 3.40.0.0 to 3.42.0.0
Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.40.0.0 to 3.42.0.0.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.40.0.0...3.42.0.0)

---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 14:59:14 +02:00
dependabot[bot]
9951525cbe Bump com.opencsv:opencsv from 5.7.1 to 5.8
Bumps com.opencsv:opencsv from 5.7.1 to 5.8.

---
updated-dependencies:
- dependency-name: com.opencsv:opencsv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 14:19:54 +02:00
dependabot[bot]
98b2c9cce2 Bump com.google.guava:guava from 31.1-android to 32.1.2-android
Bumps [com.google.guava:guava](https://github.com/google/guava) from 31.1-android to 32.1.2-android.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 14:19:42 +02:00
dependabot[bot]
19de2a2d1c Bump androidx.annotation:annotation from 1.5.0 to 1.6.0
Bumps androidx.annotation:annotation from 1.5.0 to 1.6.0.

---
updated-dependencies:
- dependency-name: androidx.annotation:annotation
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 09:31:17 +02:00
Quentin Hibon
80f783b669 Bump mockito-kotlin from 2.2.11 to 4.1.0 2023-08-08 02:44:41 +02:00
dependabot[bot]
761fe59c5e Bump commons-codec:commons-codec from 1.15 to 1.16.0
Bumps [commons-codec:commons-codec](https://github.com/apache/commons-codec) from 1.15 to 1.16.0.
- [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-codec/compare/rel/commons-codec-1.15...rel/commons-codec-1.16.0)

---
updated-dependencies:
- dependency-name: commons-codec:commons-codec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 01:35:57 +02:00
dependabot[bot]
f58d8a52ff Bump kxCoroutinesVersion from 1.6.4 to 1.7.3
Bumps `kxCoroutinesVersion` from 1.6.4 to 1.7.3.

Updates `org.jetbrains.kotlinx:kotlinx-coroutines-android` from 1.6.4 to 1.7.3
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.4...1.7.3)

Updates `org.jetbrains.kotlinx:kotlinx-coroutines-core` from 1.6.4 to 1.7.3
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.4...1.7.3)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 00:56:48 +02:00
dependabot[bot]
f4e5b68258 Bump org.apache.commons:commons-lang3 from 3.12.0 to 3.13.0
Bumps org.apache.commons:commons-lang3 from 3.12.0 to 3.13.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-lang3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 00:26:32 +02:00
dependabot[bot]
5df3ee0d61 Bump org.jlleitschuh.gradle.ktlint from 11.4.2 to 11.5.1
Bumps org.jlleitschuh.gradle.ktlint from 11.4.2 to 11.5.1.

---
updated-dependencies:
- dependency-name: org.jlleitschuh.gradle.ktlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 23:32:18 +02:00
Quentin Hibon
25cff3d9b0 Check android lint violations against current baseline 2023-08-07 23:04:46 +02:00
dependabot[bot]
9f66a27b82 Bump com.android.tools:desugar_jdk_libs from 1.2.2 to 2.0.3
Bumps [com.android.tools:desugar_jdk_libs](https://github.com/google/desugar_jdk_libs) from 1.2.2 to 2.0.3.
- [Release notes](https://github.com/google/desugar_jdk_libs/releases)
- [Changelog](https://github.com/google/desugar_jdk_libs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/desugar_jdk_libs/commits)

---
updated-dependencies:
- dependency-name: com.android.tools:desugar_jdk_libs
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-06 22:46:51 +02:00
Quentin Hibon
4bbb20e18e Remove android extensions (deprecated) 2023-08-03 22:55:05 +02:00
Quentin Hibon
4f9ab6d263 Migrate EditHabitActivity to view bindings 2023-08-03 22:55:05 +02:00
Quentin Hibon
af21fd25db Migrate FrequencyPickerDialog to view bindings 2023-08-03 22:55:05 +02:00
Quentin Hibon
35097e1263 Bump targetSdk to 32 2023-08-03 19:07:34 +02:00
Quentin Hibon
8e4274d923 Use assertThrows instead of ExpectedException 2023-08-03 19:07:04 +02:00
Quentin Hibon
12649141b1 Migrate junit.framework.Assert.assertEquals to kotlin.test.assertEquals
Also fix some warnings, e.g. shadowed variables.
2023-08-03 19:07:04 +02:00
Quentin Hibon
0526d37fbd Use official version of mockito-kotlin 2023-07-26 10:01:41 +02:00
Quentin Hibon
b083899ec8 Make AGP version explicit
This makes it possible to run the AGP upgrade assistant from Android Studio.
2023-07-26 09:47:02 +02:00
Quentin Hibon
6b793c7c16 Bump com.android.application from 7.3.1 to 7.4.2 2023-07-25 20:25:34 +02:00
Quentin Hibon
11ca993a75 Bump org.jlleitschuh.gradle.ktlint from 11.0.0 to 11.4.2
Also run ./gradlew ktlintFormat to follow new format.
2023-07-25 17:37:59 +02:00
Quentin Hibon
7348ddeffa Bump minSdk back to 28 from 23 (#1759)
Fixes #1758.
2023-07-10 18:06:59 -05:00
88df8d2552 Format source code 2023-07-08 17:13:45 -05:00
d4f4f8b4a9 Prevent crash if exact alarm permission is revoked 2023-06-05 20:25:00 -05:00
9ca1aa911a Minor layout fixes 2023-06-05 20:11:50 -05:00
ba57ebad31 Fix an invisible color in widgets; adjust another color 2023-06-05 20:01:41 -05:00
dependabot[bot]
e4d2c93a1d Bump actions/upload-artifact from 2 to 3 (#1724)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-04 18:40:58 -05:00
Ezio Melotti
07065a60ad Add "github-actions" ecosystem to dependabot.yml (#1716) 2023-06-04 18:37:35 -05:00
Jean-Baptiste
916cd76be1 Update checkout actions (#1715) 2023-06-04 18:35:08 -05:00
8b55ffb147 Fix timezone bug in MidnightTimer; increase logging 2023-06-04 18:25:33 -05:00
727e88b7b1 Fix skip button in locales that use comma instead of dot
Fixes #1721
2023-06-04 17:30:38 -05:00
f70d33878c Remove obsolete permission 2023-05-27 19:55:07 -05:00
6a55d3c01a Merge branch 'master' into dev 2023-05-27 16:14:03 -05:00
69b5ed3a6d Merge branch 'hotfix/2.1.2' 2023-05-27 15:38:27 -05:00
8b2adbf301 GH Actions: Remove API 23 2023-05-27 13:26:11 -05:00
88cc3a2a12 Update CHANGELOG 2023-05-26 20:12:06 -05:00
26526a71a9 Update test screenshots 2023-05-26 19:56:01 -05:00
11eb3713e5 Reschedule reminders on resume 2023-05-26 19:55:53 -05:00
1df9cc7664 Widgets: Remove option to create StackWidgets
StackWidgets have been unfortunately been very unreliable on multiple phones,
and fixing it does not appear to be simple. This commit removes the ability
to create new StackWidgets, but existing ones should remain functional.
2023-05-01 18:52:53 -05:00
dependabot[bot]
499eb467cb Bump daggerVersion from 2.44.2 to 2.46
Bumps `daggerVersion` from 2.44.2 to 2.46.

Updates `com.google.dagger:dagger` from 2.44.2 to 2.46
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.44.2...dagger-2.46)

Updates `com.google.dagger:dagger-compiler` from 2.44.2 to 2.46
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.44.2...dagger-2.46)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 10:00:19 +02:00
dependabot[bot]
9d4df73c56 Bump androidx.test.ext:junit from 1.1.4 to 1.1.5
Bumps androidx.test.ext:junit from 1.1.4 to 1.1.5.

---
updated-dependencies:
- dependency-name: androidx.test.ext:junit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-08 11:58:02 +02:00
dependabot[bot]
d0f32dfa0a Bump espressoVersion from 3.5.0 to 3.5.1
Bumps `espressoVersion` from 3.5.0 to 3.5.1.

Updates `androidx.test.espresso:espresso-contrib` from 3.5.0 to 3.5.1

Updates `androidx.test.espresso:espresso-core` from 3.5.0 to 3.5.1

---
updated-dependencies:
- dependency-name: androidx.test.espresso:espresso-contrib
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: androidx.test.espresso:espresso-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-08 11:57:47 +02:00
Adrian Miozga
c609eceefc Update Play Store and F-Droid badges (#1668)
* Update Play Store and F-Droid badges

* Increase size of badges
2023-03-26 12:48:53 -05:00
Quentin Hibon
eb68220b8d Remove dependency on kotlin stdlib (#1669)
According to:
https://kotlinlang.org/docs/whatsnew14.html#dependency-on-the-standard-library-added-by-default
the explicit dependency is no longer needed.
2023-03-26 12:48:12 -05:00
dependabot[bot]
f1a003fabf Bump com.google.android.material:material from 1.7.0 to 1.8.0
Bumps [com.google.android.material:material](https://github.com/material-components/material-components-android) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/material-components/material-components-android/releases)
- [Commits](https://github.com/material-components/material-components-android/compare/1.7.0...1.8.0)

---
updated-dependencies:
- dependency-name: com.google.android.material:material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-26 12:49:27 +02:00
b76da35752 Widgets: Increase corner radius to match Android 12 2023-03-24 05:24:58 -05:00
abead88ceb GH Actions: Fix build.sh 2023-03-23 04:48:40 -05:00
908eb4ac99 Convert NumberDialog to AppCompatDialogFragment; remove unused classes 2023-03-18 05:04:43 -05:00
dependabot[bot]
856a0726f7 Bump logback-classic from 1.4.4 to 1.4.5
Bumps [logback-classic](https://github.com/qos-ch/logback) from 1.4.4 to 1.4.5.
- [Release notes](https://github.com/qos-ch/logback/releases)
- [Commits](https://github.com/qos-ch/logback/compare/v_1.4.4...v_1.4.5)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-01 09:43:07 +01:00
dependabot[bot]
df97b1fd4f Bump espressoVersion from 3.4.0 to 3.5.0
Bumps `espressoVersion` from 3.4.0 to 3.5.0.

Updates `espresso-contrib` from 3.4.0 to 3.5.0

Updates `espresso-core` from 3.4.0 to 3.5.0

---
updated-dependencies:
- dependency-name: androidx.test.espresso:espresso-contrib
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: androidx.test.espresso:espresso-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-01 09:42:46 +01:00
71a05d598a CheckmarkDialog: Switch to AppCompatDialogFragment
Fixes issues with the soft keyboard covering the popup.
2023-01-30 05:59:42 -06:00
2131fb3a3d EntryList: Copy notes from original entries
Fixes #1566
2023-01-24 05:59:23 -06:00
1470dcd560 Remove toggle delay 2023-01-23 03:50:38 -06:00
dc678e59df GH Actions: Set job timeout 2022-12-23 10:31:30 -06:00
dependabot[bot]
d95084500f Bump daggerVersion from 2.43.2 to 2.44.2 (#1582)
Bumps `daggerVersion` from 2.43.2 to 2.44.2.

Updates `dagger` from 2.43.2 to 2.44.2
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.43.2...dagger-2.44.2)

Updates `dagger-compiler` from 2.43.2 to 2.44.2
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.43.2...dagger-2.44.2)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-20 04:10:18 -06:00
6f7215b46f Update dependencies 2022-12-19 08:57:30 -06:00
Jakub Kalinowski
c423d2b3ca Issue 1574: Fixed the almost invisible watch hands in snooze activity (#1592)
* Setting the current theme correctly

* Ktlint correction
2022-12-18 04:25:06 -06:00
Jakub Kalinowski
758fc56277 Issue 1576: Solving problems with habitbull import (#1591)
* Recomputing the habit after import, corrected order of magnitude

* Corrected HabitBullCSV3 test and added a new one
2022-12-18 04:05:14 -06:00
Jakub Kalinowski
c7d1e92cae Issue 1589: Fixed crash after choosing Settings/Rate app when there's no Play Store on the device (#1590)
* Using startActivitySafely when launching Play Store

* Returning true for rateApp click
2022-12-12 00:55:58 +01:00
dependabot[bot]
d24dcbf2ca Bump kotlinVersion from 1.7.10 to 1.7.21
Bumps `kotlinVersion` from 1.7.10 to 1.7.21.

Updates `org.jetbrains.kotlin.android` from 1.7.10 to 1.7.21

Updates `org.jetbrains.kotlin.kapt` from 1.7.10 to 1.7.21

Updates `org.jetbrains.kotlin.android.extensions` from 1.7.10 to 1.7.21

Updates `org.jetbrains.kotlin.multiplatform` from 1.7.10 to 1.7.21

Updates `kotlin-stdlib-jdk8` from 1.7.10 to 1.7.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.7.10...v1.7.21)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin.android
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin.kapt
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin.android.extensions
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin.multiplatform
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-26 22:12:04 +01:00
dependabot[bot]
579b33cc78 Bump appcompat from 1.5.0 to 1.5.1
Bumps appcompat from 1.5.0 to 1.5.1.

---
updated-dependencies:
- dependency-name: androidx.appcompat:appcompat
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-25 22:12:00 +01:00
dependabot[bot]
1a3e6315a1 Bump opencsv from 5.6 to 5.7.1
Bumps opencsv from 5.6 to 5.7.1.

---
updated-dependencies:
- dependency-name: com.opencsv:opencsv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-25 17:29:07 +01:00
dependabot[bot]
7f4d06d15d Bump logback-classic from 1.4.0 to 1.4.4
Bumps [logback-classic](https://github.com/qos-ch/logback) from 1.4.0 to 1.4.4.
- [Release notes](https://github.com/qos-ch/logback/releases)
- [Commits](https://github.com/qos-ch/logback/compare/v_1.4.0...v_1.4.4)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-25 17:28:46 +01:00
dependabot[bot]
b8033a6012 Bump sqlite-jdbc from 3.39.2.1 to 3.39.3.0
Bumps [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.39.2.1 to 3.39.3.0.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.39.2.1...3.39.3.0)

---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-25 17:28:36 +01:00
471f977209 Replace some incorrect usages of getToday by getTodayWithOffset
Fixes #1541
2022-10-22 17:11:59 -05:00
2ba5f5fb98 Dismiss current dialog onPause
Fixes #1545
2022-10-22 16:19:49 -05:00
4de67bd27a GH Actions: Remove API 27 2022-10-22 16:01:36 -05:00
0bb82a48a5 NumberPopup: Accept comma (instead of dot) in certain locales
Fixes #1532
2022-10-22 15:44:30 -05:00
d5a5273607 Bump version to 2.1.2 2022-10-22 15:25:42 -05:00
404671546c Revert "uhabits-core: Add js targets"
This reverts commit da09df2dd1.
2022-09-24 20:39:54 -05:00
a94c6e8b9f Merge branch 'master' into dev 2022-09-24 19:44:31 -05:00
da09df2dd1 uhabits-core: Add js targets 2022-09-24 19:42:09 -05:00
40a4d254f5 Merge branch 'hotfix/2.1.1' 2022-09-24 19:40:04 -05:00
177d01edd9 Fix Tasker plugin; bump version to 2.1.1
Fixes #1503
2022-09-24 19:25:42 -05:00
9f5da7b4fe Update TEST.md
[skip ci]
2022-09-10 20:44:00 -05:00
e42d41ef30 Bump minSdk to 28
This change is mostly to reduce the number of APIs we need to run tests
for (from 11 APIs to 6). API 27 was released 5 years ago. Also, as of
2022-09-01, 95.1% of our monthly active users are on API 28 or higher.
2022-09-10 19:57:57 -05:00
5498ff8a87 Switch emulator to google_apis; test APIs 28 to 33 2022-09-10 19:25:40 -05:00
20dcc7929b Remove unused folders 2022-09-10 17:04:43 -05:00
1283cf979d Update CHANGELOG 2022-09-10 16:51:20 -05:00
0a493ff065 Merge branch 'master' into dev 2022-09-10 16:50:48 -05:00
16cd249bae Update CHANGELOG 2022-09-10 16:50:16 -05:00
d136572960 Minor fix to BarChart 2022-09-10 16:50:16 -05:00
318aa3c821 Fix ListHabitsScreen.showColorPicker 2022-09-10 16:50:16 -05:00
73712e0d10 Always update widgets on launch
Helps mitigate situations where the widgets mysteriously fail to render.
The user can always force a refresh by opening the app.
2022-09-10 16:50:16 -05:00
bf504641c6 Merge pull request #1488 from iSoron/fix/stackwidget-api33
Widget fixes
2022-09-10 16:11:55 -05:00
ec1f0c5356 StackWidget: Remove unused remoteViews; fix invalid check 2022-09-09 06:02:57 -05:00
2154d8c192 StackWidget: Remove unused remoteViews; fix invalid check 2022-09-09 05:57:13 -05:00
961fb7618f splitLongs: Handle NumberFormatException 2022-09-09 05:39:15 -05:00
11f726064a StackWidget: Avoid storing RemoteViews reference 2022-09-09 05:39:15 -05:00
4c5a722dc5 splitLongs: Handle NumberFormatException 2022-09-09 05:17:54 -05:00
ee39ff0eda StackWidget: Avoid storing RemoteViews reference 2022-09-08 20:35:59 -05:00
abced92a07 Update CHANGELOG 2022-09-08 20:09:47 -05:00
cheer
eeacc5eef8 Support for Android 13 Themed Icons (#1497) 2022-09-08 20:08:12 -05:00
Eduardo Esparza
16c65f19fd fix marker scaling for numerical habits in frequency display (#1489) 2022-09-08 20:08:05 -05:00
cheer
6a9c3a36eb Support for Android 13 Themed Icons (#1497) 2022-09-08 20:06:57 -05:00
Eduardo Esparza
99ccb44ad3 fix marker scaling for numerical habits in frequency display (#1489) 2022-09-08 20:01:12 -05:00
fc402fd81b Minor fix to BarChart 2022-09-03 20:26:21 -05:00
f7c6bc716c Fix ListHabitsScreen.showColorPicker 2022-09-03 19:52:13 -05:00
2535347d5a Always update widgets on launch
Helps mitigate situations where the widgets mysteriously fail to render.
The user can always force a refresh by opening the app.
2022-09-03 19:45:31 -05:00
dependabot[bot]
8c0655c352 Bump sqlite-jdbc from 3.39.2.0 to 3.39.2.1 (#1483)
Bumps [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.39.2.0 to 3.39.2.1.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.39.2.0...3.39.2.1)

---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-03 18:51:50 -05:00
dependabot[bot]
335f8c32fd Bump desugar_jdk_libs from 1.1.5 to 1.2.2 (#1482)
Bumps [desugar_jdk_libs](https://github.com/google/desugar_jdk_libs) from 1.1.5 to 1.2.2.
- [Release notes](https://github.com/google/desugar_jdk_libs/releases)
- [Changelog](https://github.com/google/desugar_jdk_libs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/desugar_jdk_libs/commits)

---
updated-dependencies:
- dependency-name: com.android.tools:desugar_jdk_libs
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-03 18:51:40 -05:00
dependabot[bot]
f77c064722 Bump logback-classic from 1.2.11 to 1.4.0 (#1481)
Bumps [logback-classic](https://github.com/qos-ch/logback) from 1.2.11 to 1.4.0.
- [Release notes](https://github.com/qos-ch/logback/releases)
- [Commits](https://github.com/qos-ch/logback/compare/v_1.2.11...v_1.4.0)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-03 18:51:31 -05:00
dependabot[bot]
8b0b757f04 Bump org.jlleitschuh.gradle.ktlint from 10.3.0 to 11.0.0 (#1480)
Bumps org.jlleitschuh.gradle.ktlint from 10.3.0 to 11.0.0.

---
updated-dependencies:
- dependency-name: org.jlleitschuh.gradle.ktlint
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-03 18:51:20 -05:00
13af054214 Use different request codes for showNumberPicker pendingIntent
Fixes #1468
2022-09-03 18:46:52 -05:00
fcbb586e80 Use pending intent templates on StackWidget
Fixes #1463
2022-09-03 17:51:55 -05:00
458c9f3b15 Merge branch 'release/2.1.0' into dev 2022-08-17 05:53:48 -05:00
dfa74960b3 Merge branch 'release/2.1.0' into dev 2022-08-17 05:51:36 -05:00
f082842fbe Update Gradle, AGP & Kotlin 2022-08-17 05:36:37 -05:00
d4d818a085 Upgrade dependencies 2022-08-16 05:42:29 -05:00
dependabot[bot]
f074d0331d Bump sqlite-jdbc from 3.36.0.3 to 3.39.2.0 (#1449)
Bumps [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.36.0.3 to 3.39.2.0.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.36.0.3...3.39.2.0)

---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-15 06:36:31 -05:00
Jakub Kalinowski
f94bc62a94 Replaced activity!! with requireActivity, context!! with requireContext etc. (#1458) 2022-08-15 06:36:03 -05:00
Jakub Kalinowski
428bf42e79 Reimplementing the multiple popups handling in the new popup solution. (#1454)
Co-authored-by: Jakub Kalinowski <kalj@netcompany.com>
2022-08-14 13:25:01 -05:00
b0097fa45e Merge pull request #1450 from iSoron/dependabot/gradle/daggerVersion-2.43.2
Bump daggerVersion from 2.43.1 to 2.43.2
2022-08-14 05:09:35 -05:00
dependabot[bot]
15fa1fea8c Bump daggerVersion from 2.43.1 to 2.43.2
Bumps `daggerVersion` from 2.43.1 to 2.43.2.

Updates `dagger` from 2.43.1 to 2.43.2
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.43.1...dagger-2.43.2)

Updates `dagger-compiler` from 2.43.1 to 2.43.2
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.43.1...dagger-2.43.2)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-13 16:00:55 +00:00
31368cff45 Merge pull request #1453 from iSoron/dependabot/gradle/org.jetbrains.kotlin-kotlin-stdlib-jdk8-1.7.10
Bump kotlin-stdlib-jdk8 from 1.7.0 to 1.7.10
2022-08-13 11:00:35 -05:00
b44dd96dd3 Merge pull request #1444 from iSoron/dependabot/gradle/org.jetbrains.kotlinx-kotlinx-coroutines-core-jvm-1.6.4
Bump kotlinx-coroutines-core-jvm from 1.6.3 to 1.6.4
2022-08-13 10:59:51 -05:00
838e13f30c Prevent crashes in AutoBackup from blocking app launch 2022-08-13 07:25:12 -05:00
dependabot[bot]
08fab0cd8d Bump kotlin-stdlib-jdk8 from 1.7.0 to 1.7.10
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.7.0 to 1.7.10.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.7.10/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.7.0...v1.7.10)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-13 09:28:01 +00:00
dependabot[bot]
a142685d2e Bump kotlinx-coroutines-core-jvm from 1.6.3 to 1.6.4
Bumps [kotlinx-coroutines-core-jvm](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.3 to 1.6.4.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.3...1.6.4)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-13 09:27:25 +00:00
a7a95f2030 Merge pull request #1443 from iSoron/dependabot/gradle/org.jetbrains.kotlin-kotlin-stdlib-1.7.10
Bump kotlin-stdlib from 1.7.0 to 1.7.10
2022-08-13 04:26:42 -05:00
dependabot[bot]
d3c90481be Bump kotlin-stdlib from 1.7.0 to 1.7.10
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.7.0 to 1.7.10.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.7.10/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.7.0...v1.7.10)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-11 10:22:15 +00:00
f9bb0d7d7b Merge pull request #1445 from iSoron/dependabot/gradle/com.linkedin.dexmaker-dexmaker-mockito-2.28.3
Bump dexmaker-mockito from 2.28.1 to 2.28.3
2022-08-11 05:20:29 -05:00
f23a1bedee Merge pull request #1442 from iSoron/dependabot/gradle/daggerVersion-2.43.1
Bump daggerVersion from 2.42 to 2.43.1
2022-08-11 05:20:16 -05:00
dcf31ba115 Merge pull request #1441 from iSoron/dependabot/gradle/kxCoroutinesVersion-1.6.4
Bump kxCoroutinesVersion from 1.6.3 to 1.6.4
2022-08-11 05:20:04 -05:00
0eae43fe55 Fix "enter" notification action on API 31 2022-08-11 05:17:41 -05:00
c0fcd4e763 Update CHANGELOG 2022-08-11 04:08:22 -05:00
79e2402c9d Merge pull request #1425 from eduebernal/freq-display-normal
fix marker scaling in frequency display
2022-08-11 04:04:29 -05:00
dependabot[bot]
5409a324e8 Bump dexmaker-mockito from 2.28.1 to 2.28.3
Bumps [dexmaker-mockito](https://github.com/linkedin/dexmaker) from 2.28.1 to 2.28.3.
- [Release notes](https://github.com/linkedin/dexmaker/releases)
- [Changelog](https://github.com/linkedin/dexmaker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/linkedin/dexmaker/compare/2.28.1...2.28.3)

---
updated-dependencies:
- dependency-name: com.linkedin.dexmaker:dexmaker-mockito
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-01 03:04:42 +00:00
dependabot[bot]
504362e680 Bump daggerVersion from 2.42 to 2.43.1
Bumps `daggerVersion` from 2.42 to 2.43.1.

Updates `dagger` from 2.42 to 2.43.1
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.42...dagger-2.43.1)

Updates `dagger-compiler` from 2.42 to 2.43.1
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.42...dagger-2.43.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-01 03:03:08 +00:00
dependabot[bot]
0ce2f8fae2 Bump kxCoroutinesVersion from 1.6.3 to 1.6.4
Bumps `kxCoroutinesVersion` from 1.6.3 to 1.6.4.

Updates `kotlinx-coroutines-android` from 1.6.3 to 1.6.4
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.3...1.6.4)

Updates `kotlinx-coroutines-core` from 1.6.3 to 1.6.4
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.3...1.6.4)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-01 03:02:48 +00:00
2fc6c67432 Merge pull request #1425 from eduebernal/freq-display-normal
fix marker scaling in frequency display
2022-07-30 18:30:53 -05:00
459cf02642 Merge pull request #1370 from iSoron/number-popup
Replace NumberPickerDialog by NumberPopup
2022-07-30 18:30:32 -05:00
44cb64601f Update test screenshots 2022-07-30 17:28:46 -05:00
53c270ee12 Merge branch 'number-popup' into release/2.1.0 2022-07-30 16:41:05 -05:00
e4b16f6d59 Replace PopupWindow by Dialog
Fixes issues with copy & paste, text selection and spell checking.
2022-07-30 16:33:16 -05:00
3021e408a7 Remove unused imports 2022-07-24 06:01:40 -05:00
7649119db7 Popup: Do not save on dismiss 2022-07-24 05:47:52 -05:00
b0a4f26e7a Popup: Fix crash on suggestions 2022-07-24 05:47:52 -05:00
eduebernal
dd47d4cf08 fix getWeekdaysInMonth test 2022-07-06 15:09:10 -07:00
eduebernal
8912a9d73c add test for getWeekdaysInMonth 2022-07-06 10:48:58 -07:00
eduebernal
9bd1c6f685 change getWeekdaysInMonth method 2022-07-06 10:48:19 -07:00
eduebernal
e15e06034c remove unused maxFreq var and get method 2022-07-06 10:46:50 -07:00
eduebernal
a6180a5049 fix marker scaling in freq display 2022-07-05 21:41:27 -07:00
dependabot[bot]
7c69b17e77 Bump kxCoroutinesVersion from 1.6.2 to 1.6.3
Bumps `kxCoroutinesVersion` from 1.6.2 to 1.6.3.

Updates `kotlinx-coroutines-android` from 1.6.2 to 1.6.3
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.2...1.6.3)

Updates `kotlinx-coroutines-core` from 1.6.2 to 1.6.3
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.2...1.6.3)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 07:42:04 +02:00
dependabot[bot]
602a40a532 Bump simpleclient_httpserver from 0.15.0 to 0.16.0
Bumps [simpleclient_httpserver](https://github.com/prometheus/client_java) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.15.0...parent-0.16.0)

---
updated-dependencies:
- dependency-name: io.prometheus:simpleclient_httpserver
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-03 21:27:22 +02:00
dependabot[bot]
e00998f913 Bump annotation from 1.3.0 to 1.4.0
Bumps annotation from 1.3.0 to 1.4.0.

---
updated-dependencies:
- dependency-name: androidx.annotation:annotation
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-03 21:26:54 +02:00
dependabot[bot]
af5914c2db Bump kotlinx-coroutines-core-jvm from 1.6.2 to 1.6.3
Bumps [kotlinx-coroutines-core-jvm](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.2 to 1.6.3.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.2...1.6.3)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 12:52:10 +02:00
dependabot[bot]
6c5f70638a Bump kotlin-stdlib-jdk8 from 1.6.21 to 1.7.0
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.6.21 to 1.7.0.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.6.21...v1.7.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 12:51:50 +02:00
dependabot[bot]
ba88552919 Bump appcompat from 1.4.1 to 1.4.2
Bumps appcompat from 1.4.1 to 1.4.2.

---
updated-dependencies:
- dependency-name: androidx.appcompat:appcompat
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 07:09:30 +02:00
dependabot[bot]
8c90c4f68d Bump kotlin-stdlib from 1.6.21 to 1.7.0
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.6.21 to 1.7.0.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.6.21...v1.7.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 07:09:11 +02:00
dependabot[bot]
08eb1a600d Bump simpleclient_hotspot from 0.15.0 to 0.16.0
Bumps [simpleclient_hotspot](https://github.com/prometheus/client_java) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.15.0...parent-0.16.0)

---
updated-dependencies:
- dependency-name: io.prometheus:simpleclient_hotspot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 07:08:57 +02:00
dependabot[bot]
8ea0480d4a Bump simpleclient from 0.15.0 to 0.16.0
Bumps [simpleclient](https://github.com/prometheus/client_java) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.15.0...parent-0.16.0)

---
updated-dependencies:
- dependency-name: io.prometheus:simpleclient
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 07:08:46 +02:00
Hielke Morsink
36ee39589e Fix small typo in build instructions 2022-06-28 20:02:46 +02:00
dependabot[bot]
ac7a721940 Bump daggerVersion from 2.41 to 2.42
Bumps `daggerVersion` from 2.41 to 2.42.

Updates `dagger` from 2.41 to 2.42
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.41...dagger-2.42)

Updates `dagger-compiler` from 2.41 to 2.42
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.41...dagger-2.42)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-02 10:30:33 +02:00
dependabot[bot]
b36ca8673a Bump kxCoroutinesVersion from 1.6.1 to 1.6.2
Bumps `kxCoroutinesVersion` from 1.6.1 to 1.6.2.

Updates `kotlinx-coroutines-android` from 1.6.1 to 1.6.2
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.1...1.6.2)

Updates `kotlinx-coroutines-core` from 1.6.1 to 1.6.2
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.1...1.6.2)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-02 10:30:27 +02:00
dependabot[bot]
7cfac486f9 Bump org.jlleitschuh.gradle.ktlint from 10.2.1 to 10.3.0
Bumps org.jlleitschuh.gradle.ktlint from 10.2.1 to 10.3.0.

---
updated-dependencies:
- dependency-name: org.jlleitschuh.gradle.ktlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 23:07:05 +02:00
dependabot[bot]
21dd413ab5 Bump material from 1.5.0 to 1.6.1
Bumps [material](https://github.com/material-components/material-components-android) from 1.5.0 to 1.6.1.
- [Release notes](https://github.com/material-components/material-components-android/releases)
- [Commits](https://github.com/material-components/material-components-android/compare/1.5.0...1.6.1)

---
updated-dependencies:
- dependency-name: com.google.android.material:material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 23:04:11 +02:00
dependabot[bot]
39e10638b5 Bump kotlinx-coroutines-core-jvm from 1.6.1 to 1.6.2
Bumps [kotlinx-coroutines-core-jvm](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.1 to 1.6.2.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.1...1.6.2)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 23:04:01 +02:00
0a95b6d2a0 GitHub Actions: Use self-hosted runner 2022-05-16 22:53:35 -05:00
e6bcbb39ff GitHub Actions: Enable AVD cache 2022-05-16 15:26:57 -05:00
90de1f3723 GitHub Actions: Implement emulator boot timeout 2022-05-15 10:42:07 -05:00
68740b4043 SettingsFragment: Minor changes to theme 2022-05-15 09:23:47 -05:00
b66a6ff717 Write release notes 2022-05-15 00:33:36 -05:00
7c1a91e35a Update list of translators 2022-05-15 00:23:27 -05:00
366e9af167 Update translations 2022-05-15 00:15:56 -05:00
03b02aaa06 Merge branch 'number-popup' into release/2.1.0 2022-05-14 23:22:28 -05:00
Quentin Hibon
180cf25ad3 Fix tests in APIs 30, 31 2022-05-14 17:19:53 -05:00
3490cd183a GitHub Actions: Re-run only failed tests; warn about slow tests 2022-05-14 08:45:24 -05:00
Quentin Hibon
0c292d1eaa Make some rendering tests more tolerant 2022-05-13 11:57:54 -05:00
0b256cb2c0 GitHub Actions: Enable API 30, 31; drop some older ones 2022-05-13 11:19:05 -05:00
cc03c48648 TargetCard: Make target more accurate for non-daily habits 2022-05-13 09:53:27 -05:00
53e7ef2918 LoopDBImporter: Improve performance; silence snackbar messages 2022-05-13 08:33:00 -05:00
9609bee0f7 Update CHANGELOG and list of developers 2022-05-13 08:33:00 -05:00
5b23a3f960 Bump version to 2.1.0 2022-05-13 08:33:00 -05:00
d2d45991b0 Always show popups at the center of the screen; remove ScreenLocation 2022-05-13 06:37:41 -05:00
25aeafb759 Remove unused imports 2022-05-13 05:21:29 -05:00
9045ae5c24 Remove previous NumberPicker 2022-05-13 05:21:29 -05:00
555873354c Use NumberPopup in HistoryCard 2022-05-13 05:21:29 -05:00
2a012619a7 Use NumberPopup in widgets 2022-05-13 05:21:28 -05:00
d1de3a852b Implement NumberPopup 2022-05-13 05:21:28 -05:00
f04e37e905 Remove CheckmarkDialog 2022-05-03 04:09:13 -05:00
825a5f2cb9 Implement CheckmarkPopup 2022-05-03 04:09:13 -05:00
0de6896691 Add notes to DelayedToggle, make delay skipable 2022-05-03 04:09:13 -05:00
7187214282 Replace notesIndicator by notes 2022-05-03 04:09:13 -05:00
Jakub Kalinowski
9d4161a255 Issue 1332: Multiple numeric dialogs appearing (#1356)
Co-authored-by: Jakub Kalinowski <kalj@netcompany.com>
2022-05-01 20:01:13 -05:00
dependabot[bot]
d82a3c145d Bump kotlin-stdlib-jdk8 from 1.6.10 to 1.6.21
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.6.10 to 1.6.21.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.6.21/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.6.10...v1.6.21)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 23:14:37 +02:00
dependabot[bot]
a6cbd44e42 Bump kotlinx-coroutines-core-jvm from 1.6.0 to 1.6.1
Bumps [kotlinx-coroutines-core-jvm](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.0...1.6.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 23:14:28 +02:00
dependabot[bot]
45c62b4ab2 Bump kxCoroutinesVersion from 1.6.0 to 1.6.1
Bumps `kxCoroutinesVersion` from 1.6.0 to 1.6.1.

Updates `kotlinx-coroutines-android` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.0...1.6.1)

Updates `kotlinx-coroutines-core` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.0...1.6.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 19:44:14 +02:00
dependabot[bot]
d53312d261 Bump kotlin-stdlib from 1.6.10 to 1.6.21
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.6.10 to 1.6.21.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.6.21/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.6.10...v1.6.21)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 19:43:58 +02:00
Quentin Hibon
c453810785 Resort habit list after habit edit (#1350)
* Add regression test for #1131
* Resort habit list after habit edit

Fixes #1131.
2022-04-21 11:29:42 -05:00
Quentin Hibon
999057300b Bump kotlin from 1.5.0 to 1.6.10 (#1349) 2022-04-15 15:40:36 -05:00
Quentin Hibon
2245347e28 Clean up SDK_INT branches (#1348)
Fixes #1347.
2022-04-15 09:34:43 -05:00
Kürşad Bumin Giray Saka
b79f7850ed Add archive actions if there are archived habits (#1345) 2022-04-11 20:50:44 -05:00
dependabot[bot]
4469f86e46 Bump logback-classic from 1.2.10 to 1.2.11
Bumps logback-classic from 1.2.10 to 1.2.11.

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 21:44:03 +02:00
dependabot[bot]
bdeddb149e Bump ktorVersion from 1.6.7 to 1.6.8
Bumps `ktorVersion` from 1.6.7 to 1.6.8.

Updates `ktor-client-mock` from 1.6.7 to 1.6.8
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.7...1.6.8)

Updates `ktor-jackson` from 1.6.7 to 1.6.8
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.7...1.6.8)

Updates `ktor-client-android` from 1.6.7 to 1.6.8
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.7...1.6.8)

Updates `ktor-client-core` from 1.6.7 to 1.6.8
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.7...1.6.8)

Updates `ktor-client-jackson` from 1.6.7 to 1.6.8
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.7...1.6.8)

Updates `ktor-client-json` from 1.6.7 to 1.6.8
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.7...1.6.8)

Updates `ktor-server-netty` from 1.6.7 to 1.6.8
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.7...1.6.8)

Updates `ktor-server-core` from 1.6.7 to 1.6.8
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.7...1.6.8)

Updates `ktor-html-builder` from 1.6.7 to 1.6.8
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.7...1.6.8)

Updates `ktor-server-tests` from 1.6.7 to 1.6.8
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.7...1.6.8)

---
updated-dependencies:
- dependency-name: io.ktor:ktor-client-mock
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-jackson
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-jackson
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-json
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-html-builder
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-tests
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 21:43:45 +02:00
Jakub Kalinowski
3b12ec4bfe Issue 1316: Skip measurable habit (#1319)
Co-authored-by: Jakub Kalinowski <kalj@netcompany.com>
2022-03-24 06:08:31 -05:00
ca4618579e Reduce toggle delay 2022-03-20 18:55:19 -05:00
2f13aba22c CheckmarkButtonView: Make focusable 2022-03-20 18:55:19 -05:00
dba5912ecd Remove leading/trailing whitespace from notes 2022-03-20 18:55:18 -05:00
88b8663484 Remove pref_led_notifications 2022-03-20 18:55:18 -05:00
609886fd09 Fix iOS build scripts 2022-03-20 11:14:53 -05:00
a4db997e06 Merge pull request #1314 from kalina559/feature/case_1282_calendar_bug
Fixed edit history calendar bug
2022-03-10 06:05:04 -06:00
Jakub Kalinowski
090216ccb7 Fixed edit history calendar bug 2022-03-05 19:54:48 +01:00
dependabot[bot]
472092d1bf Bump simpleclient from 0.14.1 to 0.15.0
Bumps [simpleclient](https://github.com/prometheus/client_java) from 0.14.1 to 0.15.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.14.1...parent-0.15.0)

---
updated-dependencies:
- dependency-name: io.prometheus:simpleclient
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 21:14:31 +01:00
dependabot[bot]
6d3791de31 Bump daggerVersion from 2.40.5 to 2.41
Bumps `daggerVersion` from 2.40.5 to 2.41.

Updates `dagger` from 2.40.5 to 2.41
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.40.5...dagger-2.41)

Updates `dagger-compiler` from 2.40.5 to 2.41
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.40.5...dagger-2.41)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 18:17:46 +01:00
dependabot[bot]
24a99d5791 Bump simpleclient_httpserver from 0.14.1 to 0.15.0
Bumps [simpleclient_httpserver](https://github.com/prometheus/client_java) from 0.14.1 to 0.15.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.14.1...parent-0.15.0)

---
updated-dependencies:
- dependency-name: io.prometheus:simpleclient_httpserver
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 18:17:39 +01:00
dependabot[bot]
6c631b1cf6 Bump opencsv from 5.5.2 to 5.6
Bumps opencsv from 5.5.2 to 5.6.

---
updated-dependencies:
- dependency-name: com.opencsv:opencsv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 10:11:09 +01:00
dependabot[bot]
5d7677b354 Bump guava from 31.0.1-android to 31.1-android
Bumps [guava](https://github.com/google/guava) from 31.0.1-android to 31.1-android.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 10:05:35 +01:00
dependabot[bot]
22820f4f24 Bump simpleclient_hotspot from 0.14.1 to 0.15.0
Bumps [simpleclient_hotspot](https://github.com/prometheus/client_java) from 0.14.1 to 0.15.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.14.1...parent-0.15.0)

---
updated-dependencies:
- dependency-name: io.prometheus:simpleclient_hotspot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 10:05:09 +01:00
1d3bd48535 Merge pull request #1278 from hiqua/fix_habit_bull_numerical
Handle numerical habits from HabitBull
2022-02-02 03:08:30 -06:00
dependabot[bot]
694446b7e3 Bump appcompat from 1.4.0 to 1.4.1
Bumps appcompat from 1.4.0 to 1.4.1.

---
updated-dependencies:
- dependency-name: androidx.appcompat:appcompat
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-01 12:13:14 +01:00
dependabot[bot]
20ae9d247e Bump material from 1.4.0 to 1.5.0
Bumps [material](https://github.com/material-components/material-components-android) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/material-components/material-components-android/releases)
- [Commits](https://github.com/material-components/material-components-android/compare/1.4.0...1.5.0)

---
updated-dependencies:
- dependency-name: com.google.android.material:material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-01 10:39:54 +01:00
dependabot[bot]
1943fac610 Bump AppIntro from 6.1.0 to 6.2.0
Bumps [AppIntro](https://github.com/AppIntro/AppIntro) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/AppIntro/AppIntro/releases)
- [Changelog](https://github.com/AppIntro/AppIntro/blob/main/CHANGELOG.md)
- [Commits](https://github.com/AppIntro/AppIntro/compare/6.1.0...6.2.0)

---
updated-dependencies:
- dependency-name: com.github.AppIntro:AppIntro
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-01 10:39:47 +01:00
Quentin Hibon
a07a50e635 Handle numerical habits from HabitBull
Fixes #1265.
2022-01-27 20:33:17 +01:00
Quentin Hibon
8ccb9bbab1 Bumps appcompat from 1.3.1 to 1.4.0. 2022-01-09 07:21:12 +01:00
Quentin Hibon
743b8d26ad gradle.properties: remove deprecated MaxPermSize parameter 2022-01-08 22:49:40 +01:00
dependabot[bot]
c47bd4c328 Bump kotlin-stdlib-jdk8 from 1.6.0 to 1.6.10
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.6.0 to 1.6.10.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.6.0...v1.6.10)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-05 10:03:59 +01:00
dependabot[bot]
d84abc3a6a Bump com.github.johnrengelman.shadow from 7.1.0 to 7.1.2
Bumps com.github.johnrengelman.shadow from 7.1.0 to 7.1.2.

---
updated-dependencies:
- dependency-name: com.github.johnrengelman.shadow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-05 10:03:52 +01:00
dependabot[bot]
4ae85f1ec0 Bump kotlin-stdlib from 1.6.0 to 1.6.10
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.6.0 to 1.6.10.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.6.0...v1.6.10)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-05 10:03:44 +01:00
dependabot[bot]
79d40d1d79 Bump simpleclient_hotspot from 0.12.0 to 0.14.1
Bumps [simpleclient_hotspot](https://github.com/prometheus/client_java) from 0.12.0 to 0.14.1.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.12.0...parent-0.14.1)

---
updated-dependencies:
- dependency-name: io.prometheus:simpleclient_hotspot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-04 19:04:33 +01:00
dependabot[bot]
1902b8821e Bump kxCoroutinesVersion from 1.5.2 to 1.6.0
Bumps `kxCoroutinesVersion` from 1.5.2 to 1.6.0.

Updates `kotlinx-coroutines-android` from 1.5.2 to 1.6.0
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.5.2...1.6.0)

Updates `kotlinx-coroutines-core` from 1.5.2 to 1.6.0
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.5.2...1.6.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-04 19:04:22 +01:00
dependabot[bot]
075542d605 Bump org.jlleitschuh.gradle.ktlint from 10.2.0 to 10.2.1
Bumps org.jlleitschuh.gradle.ktlint from 10.2.0 to 10.2.1.

---
updated-dependencies:
- dependency-name: org.jlleitschuh.gradle.ktlint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-04 19:04:16 +01:00
dependabot[bot]
0b5894ee6d Bump daggerVersion from 2.40.3 to 2.40.5
Bumps `daggerVersion` from 2.40.3 to 2.40.5.

Updates `dagger` from 2.40.3 to 2.40.5
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.40.3...dagger-2.40.5)

Updates `dagger-compiler` from 2.40.3 to 2.40.5
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.40.3...dagger-2.40.5)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-03 22:49:41 +01:00
dependabot[bot]
92fb9dbdb6 Bump simpleclient_httpserver from 0.12.0 to 0.14.1
Bumps [simpleclient_httpserver](https://github.com/prometheus/client_java) from 0.12.0 to 0.14.1.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.12.0...parent-0.14.1)

---
updated-dependencies:
- dependency-name: io.prometheus:simpleclient_httpserver
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-03 22:49:29 +01:00
dependabot[bot]
1860abf532 Bump kotlinx-coroutines-core-jvm from 1.5.2 to 1.6.0
Bumps [kotlinx-coroutines-core-jvm](https://github.com/Kotlin/kotlinx.coroutines) from 1.5.2 to 1.6.0.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.5.2...1.6.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-02 21:42:17 +01:00
dependabot[bot]
3f4780c9fb Bump ktorVersion from 1.6.6 to 1.6.7
Bumps `ktorVersion` from 1.6.6 to 1.6.7.

Updates `ktor-client-mock` from 1.6.6 to 1.6.7
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.6...1.6.7)

Updates `ktor-jackson` from 1.6.6 to 1.6.7
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.6...1.6.7)

Updates `ktor-client-android` from 1.6.6 to 1.6.7
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.6...1.6.7)

Updates `ktor-client-core` from 1.6.6 to 1.6.7
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.6...1.6.7)

Updates `ktor-client-jackson` from 1.6.6 to 1.6.7
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.6...1.6.7)

Updates `ktor-client-json` from 1.6.6 to 1.6.7
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.6...1.6.7)

Updates `ktor-server-netty` from 1.6.6 to 1.6.7
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.6...1.6.7)

Updates `ktor-server-core` from 1.6.6 to 1.6.7
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.6...1.6.7)

Updates `ktor-html-builder` from 1.6.6 to 1.6.7
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.6...1.6.7)

Updates `ktor-server-tests` from 1.6.6 to 1.6.7
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.6...1.6.7)

---
updated-dependencies:
- dependency-name: io.ktor:ktor-client-mock
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-jackson
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-jackson
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-json
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-html-builder
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-tests
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-02 21:42:00 +01:00
dependabot[bot]
d5d6e4616e Bump logback-classic from 1.2.7 to 1.2.10
Bumps logback-classic from 1.2.7 to 1.2.10.

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-02 21:41:52 +01:00
dependabot[bot]
18e267053d Bump simpleclient from 0.12.0 to 0.14.1
Bumps [simpleclient](https://github.com/prometheus/client_java) from 0.12.0 to 0.14.1.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.12.0...parent-0.14.1)

---
updated-dependencies:
- dependency-name: io.prometheus:simpleclient
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-02 21:41:44 +01:00
7ba9a7e4e7 Update translations 2022-01-02 11:16:21 -06:00
5b8a7c39e2 HistoryCard: Make colors more consistent for AT_MOST habits 2022-01-02 11:06:37 -06:00
d40a5a89cd Notes: Update test screenshots 2022-01-01 08:06:45 -06:00
308d558347 NumberPicker: Show keyboard more reliably 2022-01-01 07:36:40 -06:00
9770ce187a NumberPicker: Fix formatting 2022-01-01 07:28:40 -06:00
535bc03b70 NumberPicker: Clear focus of both pickers 2022-01-01 07:22:26 -06:00
642e45af89 NumberPicker: Replace "5" by "50" instead of "05" on decimal picker 2022-01-01 07:21:29 -06:00
56d2307b75 Habit notes: left align 2022-01-01 06:40:28 -06:00
d875af8a8e CheckmarkDialog: Format date using current locale 2022-01-01 06:30:57 -06:00
feeb4f057d Update translations 2021-12-29 10:10:09 -06:00
1ad5c6b896 Restore x_times_per_y_days translations 2021-12-29 10:01:22 -06:00
baee3b9f86 Merge branch 'sdk_30_31' into dev 2021-12-29 08:51:20 -06:00
e6167baab1 NotificationTray: Use isCompletedToday instead of value != UNKNOWN 2021-12-29 08:13:54 -06:00
Quentin Hibon
1c15e7742e Disable custom snoozing for recent Android 2021-12-11 15:22:37 +01:00
Quentin Hibon
072ba63789 Add immutable flag to pending intents 2021-12-11 15:22:37 +01:00
Quentin Hibon
0fa0daa058 Ask for SCHEDULE_EXACT_ALARM permission 2021-12-11 15:22:37 +01:00
Quentin Hibon
5a5ed3d631 Bump SDK from 30 to 31 2021-12-11 15:22:37 +01:00
Quentin Hibon
3dfa376f59 Remove deprecated bintray repositories 2021-12-11 13:51:30 +01:00
dependabot[bot]
7bf74634bb Bump kotlin-stdlib-jdk8 from 1.5.31 to 1.6.0
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.5.31 to 1.6.0.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.31...v1.6.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-02 08:40:02 +01:00
dependabot[bot]
fc645a81bc Bump kotlin-stdlib from 1.5.31 to 1.6.0
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.5.31 to 1.6.0.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.31...v1.6.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-01 21:58:08 +01:00
dependabot[bot]
35365bbdf3 Bump logback-classic from 1.2.6 to 1.2.7
Bumps logback-classic from 1.2.6 to 1.2.7.

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-01 21:57:46 +01:00
dependabot[bot]
779ef5dbee Bump com.github.triplet.play from 3.6.0 to 3.7.0
Bumps com.github.triplet.play from 3.6.0 to 3.7.0.

---
updated-dependencies:
- dependency-name: com.github.triplet.play
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-01 19:18:47 +01:00
dependabot[bot]
e82994c76b Bump annotation from 1.2.0 to 1.3.0
Bumps annotation from 1.2.0 to 1.3.0.

---
updated-dependencies:
- dependency-name: androidx.annotation:annotation
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-01 19:18:30 +01:00
dependabot[bot]
4e1d01d8d1 Bump daggerVersion from 2.40 to 2.40.3
Bumps `daggerVersion` from 2.40 to 2.40.3.

Updates `dagger` from 2.40 to 2.40.3
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.40...dagger-2.40.3)

Updates `dagger-compiler` from 2.40 to 2.40.3
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.40...dagger-2.40.3)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-01 19:18:25 +01:00
dependabot[bot]
5de0fc86e5 Bump ktorVersion from 1.6.4 to 1.6.6
Bumps `ktorVersion` from 1.6.4 to 1.6.6.

Updates `ktor-client-mock` from 1.6.4 to 1.6.6
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.4...1.6.6)

Updates `ktor-jackson` from 1.6.4 to 1.6.6
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.4...1.6.6)

Updates `ktor-client-android` from 1.6.4 to 1.6.6
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.4...1.6.6)

Updates `ktor-client-core` from 1.6.4 to 1.6.6
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.4...1.6.6)

Updates `ktor-client-jackson` from 1.6.4 to 1.6.6
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.4...1.6.6)

Updates `ktor-client-json` from 1.6.4 to 1.6.6
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.4...1.6.6)

Updates `ktor-server-netty` from 1.6.4 to 1.6.6
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.4...1.6.6)

Updates `ktor-server-core` from 1.6.4 to 1.6.6
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.4...1.6.6)

Updates `ktor-html-builder` from 1.6.4 to 1.6.6
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.4...1.6.6)

Updates `ktor-server-tests` from 1.6.4 to 1.6.6
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.4...1.6.6)

---
updated-dependencies:
- dependency-name: io.ktor:ktor-client-mock
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-jackson
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-jackson
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-json
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-html-builder
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-tests
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-01 19:18:13 +01:00
e26b643423 HabitCardView: Remove flickering due to toggle delay 2021-11-11 17:57:21 -06:00
621534d610 Merge pull request #1184 from hiqua/unfocus_every_day
Don't unfocus after select 'every day' frequency
2021-11-11 07:37:52 -06:00
a01300e9c6 Update list of developers 2021-11-11 07:27:33 -06:00
ecb8ce105a Merge pull request #1103 from vbh/feat-1074
Add notes to specific dates
2021-11-11 07:10:16 -06:00
32ef3c14f7 Settings: Update short toggle description 2021-11-11 06:54:46 -06:00
4972257635 Merge branch 'dev' into feat-1074 2021-11-11 06:43:20 -06:00
c98cb50baa CheckmarkDialog: Always set up all buttons 2021-11-11 06:35:51 -06:00
c331f34fa9 HistoryCard: Swap short/long press 2021-11-11 06:08:03 -06:00
a1aea532b5 NumberPicker: Fix vertical alignment 2021-11-11 06:01:27 -06:00
43489aeb4c CheckmarkDialog: Replace setText by append
Replace `etNotes.setText` by `etNotes.append` so that the cursor moves
to the end of the line.
2021-11-11 05:54:45 -06:00
990c85aedd CheckmarkDialog: Use theme color instead of CSV 2021-11-11 05:25:47 -06:00
Quentin Hibon
64337b9bee Bump AGP from 7.0.2 to 7.0.3 2021-11-08 20:02:43 +01:00
Quentin Hibon
8bdfaa2434 Don't explicitly change focus while switching between frequencies 2021-11-07 14:43:22 +01:00
Quentin Hibon
5f6060858d Don't unfocus after select 'every day' frequency
Fixes #1182.
2021-11-07 14:35:39 +01:00
b62e436054 Fix "hide completed" for numerical habits
Fixes #1179
2021-11-07 11:47:25 +01:00
bf63b4dbcf Remove HabitMatcherBuilder 2021-11-06 06:50:28 -05:00
a82d940bcc Small tweaks to checkmark size 2021-11-06 06:19:13 -05:00
ba59dc7ca9 Merge pull request #1177 from hiqua/fix_csv_exporter
Use the value of the Entry during CSV export
2021-11-06 06:12:27 -05:00
181290a0f3 Merge pull request #1178 from hiqua/delete_unused_test_resources
Delete unused test resources
2021-11-06 06:09:51 -05:00
Quentin Hibon
d553c2f3f2 Delete unused test resources 2021-11-05 20:48:16 +01:00
Quentin Hibon
7776093217 Test CSV export file content 2021-11-05 20:47:23 +01:00
Quentin Hibon
b27f3f8540 Use the value of the Entry during CSV export
Fixes #1162.
2021-11-05 20:02:55 +01:00
eb041bf6b2 Merge pull request #1111 from sgallese/feature/file-extensions-test
Tests for DateUtils and FileExtensions
2021-11-03 20:01:42 -05:00
dependabot[bot]
e3c53bf07f Bump daggerVersion from 2.39 to 2.40
Bumps `daggerVersion` from 2.39 to 2.40.

Updates `dagger` from 2.39 to 2.40
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.39...dagger-2.40)

Updates `dagger-compiler` from 2.39 to 2.40
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.39...dagger-2.40)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 09:02:34 +01:00
dependabot[bot]
9ddab6ee59 Bump com.github.johnrengelman.shadow from 7.0.0 to 7.1.0
Bumps com.github.johnrengelman.shadow from 7.0.0 to 7.1.0.

---
updated-dependencies:
- dependency-name: com.github.johnrengelman.shadow
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 09:02:23 +01:00
Sebastian Gallese
2615795402 Merge branch 'iSoron:dev' into feature/file-extensions-test 2021-10-31 12:05:38 -07:00
Jakub Kalinowski
6531445d7f Add delay after toggling a habit 2021-10-05 09:04:32 +02:00
sgallese
4fbf8a8ca2 DRYer offset tests 2021-10-03 22:32:14 -07:00
sgallese
707b2b4380 Add test helper for hour offset 2021-10-03 21:19:04 -07:00
sgallese
aae85c1170 Rename variable 2021-10-03 21:10:44 -07:00
sgallese
c12a6c6a4d Complete tests for DateUtils, move internal functions to private 2021-10-03 21:09:31 -07:00
sgallese
b15c02adbf Calendar tests for DateUtils 2021-10-03 21:09:31 -07:00
sgallese
9e24128675 DateUtils today offset tests 2021-10-03 21:09:31 -07:00
sgallese
66c61e2e6c More DateUtils tests 2021-10-03 21:09:31 -07:00
sgallese
7bddfbe5a7 Tests for DateUtils and FileExtensions 2021-10-03 21:09:31 -07:00
Bindu
8036b10ee6 improve yes/no dialog design 2021-10-03 04:43:53 -07:00
Bindu
71f400f587 improve numerical dialog design 2021-10-03 04:43:53 -07:00
Bindu
79e302f922 Change variable name 2021-10-03 04:43:53 -07:00
Bindu
af7f60fc4d Address review comments 2021-10-03 04:43:53 -07:00
Bindu
7cc4b66dfd Update HabitBullCSV test to accept notes 2021-10-03 04:43:53 -07:00
Bindu
a9fddf9963 Update tests and fix formatting. 2021-10-03 04:43:53 -07:00
Bindu
36c1504c6a Add dialog and notes indicator for HistoryChart 2021-10-03 04:43:53 -07:00
Bindu
d644170141 Implement dialog for Yes/No Habits 2021-10-03 04:43:53 -07:00
Bindu
d38f83e961 Added a notes field and implemented dialog for numeric habits 2021-10-03 04:43:53 -07:00
dependabot[bot]
c50c5af497 Bump logback-classic from 1.2.5 to 1.2.6
Bumps logback-classic from 1.2.5 to 1.2.6.

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-02 09:35:37 +02:00
Quentin Hibon
fa3774a32b Bump org.jlleitschuh.gradle.ktlint from 10.1.0 to 10.2.0 2021-10-01 23:32:02 +02:00
dependabot[bot]
fd124f2a6c Bump ktorVersion from 1.6.3 to 1.6.4
Bumps `ktorVersion` from 1.6.3 to 1.6.4.

Updates `ktor-client-mock` from 1.6.3 to 1.6.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.3...1.6.4)

Updates `ktor-jackson` from 1.6.3 to 1.6.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.3...1.6.4)

Updates `ktor-client-android` from 1.6.3 to 1.6.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.3...1.6.4)

Updates `ktor-client-core` from 1.6.3 to 1.6.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.3...1.6.4)

Updates `ktor-client-jackson` from 1.6.3 to 1.6.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.3...1.6.4)

Updates `ktor-client-json` from 1.6.3 to 1.6.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.3...1.6.4)

Updates `ktor-server-netty` from 1.6.3 to 1.6.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.3...1.6.4)

Updates `ktor-server-core` from 1.6.3 to 1.6.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.3...1.6.4)

Updates `ktor-html-builder` from 1.6.3 to 1.6.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.3...1.6.4)

Updates `ktor-server-tests` from 1.6.3 to 1.6.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.3...1.6.4)

---
updated-dependencies:
- dependency-name: io.ktor:ktor-client-mock
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-jackson
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-jackson
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-json
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-html-builder
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-tests
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 22:55:56 +02:00
dependabot[bot]
265b65eb8a Bump guava from 30.1.1-android to 31.0.1-android
Bumps [guava](https://github.com/google/guava) from 30.1.1-android to 31.0.1-android.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 22:55:50 +02:00
dependabot[bot]
4c269c55d2 Bump kotlin-stdlib-jdk8 from 1.5.30 to 1.5.31
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.5.30 to 1.5.31.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.31/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.30...v1.5.31)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 17:39:37 +02:00
dependabot[bot]
c03305120e Bump daggerVersion from 2.38.1 to 2.39
Bumps `daggerVersion` from 2.38.1 to 2.39.

Updates `dagger` from 2.38.1 to 2.39
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.38.1...dagger-2.39)

Updates `dagger-compiler` from 2.38.1 to 2.39
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.38.1...dagger-2.39)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 17:38:52 +02:00
dependabot[bot]
29615b670b Bump kxCoroutinesVersion from 1.5.1 to 1.5.2
Bumps `kxCoroutinesVersion` from 1.5.1 to 1.5.2.

Updates `kotlinx-coroutines-android` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.5.1...1.5.2)

Updates `kotlinx-coroutines-core` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.5.1...1.5.2)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 17:38:42 +02:00
dependabot[bot]
6ab4a696b6 Bump kotlin-stdlib from 1.5.30 to 1.5.31
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.5.30 to 1.5.31.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.31/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.30...v1.5.31)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 17:38:35 +02:00
dependabot[bot]
23479c7765 Bump opencsv from 5.5.1 to 5.5.2
Bumps opencsv from 5.5.1 to 5.5.2.

---
updated-dependencies:
- dependency-name: com.opencsv:opencsv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 08:06:26 +02:00
dependabot[bot]
6d98f7aafa Bump kotlinx-coroutines-core-jvm from 1.5.1 to 1.5.2
Bumps [kotlinx-coroutines-core-jvm](https://github.com/Kotlin/kotlinx.coroutines) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.5.1...1.5.2)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 07:58:57 +02:00
75078ed52b Merge pull request #1101 from KristianTashkov/kris/implement_at_most
Implement numerical habits with AT_MOST target type
2021-09-29 04:20:13 -05:00
2a0afedb1d SubtitleCard: Show at-most icon 2021-09-29 03:22:38 -05:00
66a2b41250 Target type: use dropdown instead of radio button 2021-09-29 03:22:31 -05:00
KristianTashkov
d6a7fa3d7a Add unit tests for numerical habits 2021-09-27 00:36:02 +03:00
KristianTashkov
07e55f1c76 modify review comments 2021-09-26 22:58:24 +03:00
4ee5dd910b Merge pull request #1116 from sgallese/feature/update-app-intro
Implement skipPressed for Intro, update to latest version of AppIntro
2021-09-23 07:06:24 -05:00
87f071b5b4 Merge pull request #1108 from sgallese/feature/midnight-timer-remove-jvm
Place MidnightTimer under test
2021-09-23 07:04:08 -05:00
bb0b5e8adf Merge pull request #1113 from KristianTashkov/kris/create_habit_border
Add border to create habit buttons
2021-09-23 06:16:07 -05:00
sgallese
c79d1e82a5 Update AppIntro to latest version 2021-09-22 20:07:06 -07:00
sgallese
4aebeedec6 Finish intro when skipped pressed 2021-09-22 20:06:41 -07:00
KristianTashkov
7de94f2caf Add border to create habit buttons 2021-09-22 16:42:40 +03:00
KristianTashkov
17ed85fc1b fix test 2021-09-22 16:18:50 +03:00
KristianTashkov
4355fb4d68 start score from 1.0 for at most and reflect the same in history 2021-09-22 15:49:51 +03:00
sgallese
508200abeb Format classes with ktlint 2021-09-21 19:25:21 -07:00
sgallese
a29943e783 Simplify midnight timer interface for testing 2021-09-21 19:21:35 -07:00
sgallese
3e6a9181d6 Code review- keep timer offset to one second 2021-09-21 19:16:37 -07:00
1fe3a3d1ca Merge pull request #1107 from sgallese/feature/string-utils-remove-jvm
Removes JVM dependencies from StringUtils
2021-09-21 20:36:22 -05:00
sgallese
b2951a3475 Place MidnightTimer under test 2021-09-19 08:41:05 -07:00
sgallese
9d3c63cf62 Removes JVM dependencies from StringUtils
See Issue #1075
2021-09-18 23:19:34 -07:00
KristianTashkov
65d237254c simplify scoring code 2021-09-12 16:56:08 +03:00
KristianTashkov
fe1d5c66cb fix bug in history card 2021-09-12 16:23:42 +03:00
KristianTashkov
113a5028af Simplify the code 2021-09-12 15:27:03 +03:00
KristianTashkov
1a56260757 add more tests for AT_MOST 2021-09-12 14:35:05 +03:00
KristianTashkov
697fffbc99 fix tests 2021-09-12 13:50:27 +03:00
KristianTashkov
804edfa64e Implement numerical habits with AT_MOST target type 2021-09-12 00:51:54 +03:00
2ab6c396d0 Merge pull request #1100 from kalina559/vector_drawables
Replaced .png drawables with vector assets where possible
2021-09-11 15:14:08 -05:00
a55f467339 Minor changes to ic_colorpicker_swatch_selected 2021-09-11 07:21:45 -05:00
Jakub Kalinowski
cf682f68c9 Dialog's positive button has bigger font size now (#1096) 2021-09-11 07:03:06 -05:00
0e988e746c Merge pull request #1082 from hiqua/improve_number_picker
Make numpad work better in number picker dialog
2021-09-11 06:56:17 -05:00
Jakub Kalinowski
f119cbf8e7 Added copyright notice 2021-09-08 19:41:13 +02:00
Jakub Kalinowski
056f5f6fce Added last .svg icons 2021-09-08 19:39:59 +02:00
Jakub Kalinowski
42f6125d5e Removed last .png icons 2021-09-08 19:39:34 +02:00
Jakub Kalinowski
3e20fc4d1d Added new .svg icons 2021-09-08 18:09:26 +02:00
Jakub Kalinowski
1f763feb69 Removed .png icons 2021-09-08 18:09:04 +02:00
Jakub Kalinowski
6e7ad329fe Added copyright notice 2021-09-08 17:49:42 +02:00
Jakub Kalinowski
5cb241475d Corrected the dark theme icon color 2021-09-08 17:47:50 +02:00
Jakub Kalinowski
27e76c7243 New edit icon 2021-09-08 17:43:25 +02:00
Jakub Kalinowski
576ad04064 Deleted edit icon 2021-09-08 17:43:04 +02:00
Jakub Kalinowski
5f8187ef6d Replaced some more .png icons with vector assets 2021-09-06 22:26:08 +02:00
Jakub Kalinowski
f16f919e27 Resolved naming issue 2021-09-06 21:54:10 +02:00
Jakub Kalinowski
736bb8a75e Added new .svg icons 2021-09-06 21:47:38 +02:00
Jakub Kalinowski
de9ad6d4a4 Deleted some old .png icons 2021-09-06 21:47:10 +02:00
Quentin Hibon
1d37ce54ea Focus fractional part after entering a decimal separator 2021-09-04 17:14:57 +02:00
Quentin Hibon
f88f1cfb54 Improve NumberPicker usage in numerical habits 2021-09-04 17:14:57 +02:00
dependabot[bot]
fc1478645b Bump com.github.triplet.play from 3.5.0 to 3.6.0
Bumps com.github.triplet.play from 3.5.0 to 3.6.0.

---
updated-dependencies:
- dependency-name: com.github.triplet.play
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-03 09:56:03 +02:00
Quentin Hibon
ffab001b09 Bump JDK from 1.8 to 11 2021-09-03 08:08:34 +02:00
Quentin Hibon
a58a8005e1 Bump AGP from 4.2.2 to 7.0.2 2021-09-03 08:08:34 +02:00
Quentin Hibon
c884ada187 Bump gradle wrapper from 7.0 to 7.2 2021-09-03 08:08:34 +02:00
Quentin Hibon
e3d46ad5a0 Bump AGP from 4.2.0 to 4.2.2 2021-09-02 19:34:05 +02:00
dependabot[bot]
f4a2c03216 Bump ktorVersion from 1.6.2 to 1.6.3
Bumps `ktorVersion` from 1.6.2 to 1.6.3.

Updates `ktor-client-mock` from 1.6.2 to 1.6.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.2...1.6.3)

Updates `ktor-jackson` from 1.6.2 to 1.6.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.2...1.6.3)

Updates `ktor-client-android` from 1.6.2 to 1.6.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.2...1.6.3)

Updates `ktor-client-core` from 1.6.2 to 1.6.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.2...1.6.3)

Updates `ktor-client-jackson` from 1.6.2 to 1.6.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.2...1.6.3)

Updates `ktor-client-json` from 1.6.2 to 1.6.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.2...1.6.3)

Updates `ktor-server-netty` from 1.6.2 to 1.6.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.2...1.6.3)

Updates `ktor-server-core` from 1.6.2 to 1.6.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.2...1.6.3)

Updates `ktor-html-builder` from 1.6.2 to 1.6.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.2...1.6.3)

Updates `ktor-server-tests` from 1.6.2 to 1.6.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.2...1.6.3)

---
updated-dependencies:
- dependency-name: io.ktor:ktor-client-mock
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-jackson
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-jackson
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-json
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-html-builder
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-tests
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-02 17:49:25 +02:00
dependabot[bot]
f2b8f2f98d Bump simpleclient_hotspot from 0.11.0 to 0.12.0
Bumps [simpleclient_hotspot](https://github.com/prometheus/client_java) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.11.0...parent-0.12.0)

---
updated-dependencies:
- dependency-name: io.prometheus:simpleclient_hotspot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-02 17:49:18 +02:00
dependabot[bot]
2c5fd87a2a Bump simpleclient from 0.11.0 to 0.12.0
Bumps [simpleclient](https://github.com/prometheus/client_java) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.11.0...parent-0.12.0)

---
updated-dependencies:
- dependency-name: io.prometheus:simpleclient
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-02 07:54:39 +02:00
dependabot[bot]
39768f7f04 Bump kotlin-stdlib-jdk8 from 1.5.21 to 1.5.30
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.5.21 to 1.5.30.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.21...v1.5.30)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-02 07:54:29 +02:00
dependabot[bot]
cc3e1ced15 Bump sqlite-jdbc from 3.36.0.1 to 3.36.0.3
Bumps [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.36.0.1 to 3.36.0.3.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.36.0.1...3.36.0.3)

---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-02 07:54:13 +02:00
dependabot[bot]
2e26cc104e Bump simpleclient_httpserver from 0.11.0 to 0.12.0
Bumps [simpleclient_httpserver](https://github.com/prometheus/client_java) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.11.0...parent-0.12.0)

---
updated-dependencies:
- dependency-name: io.prometheus:simpleclient_httpserver
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-01 08:12:08 +02:00
dependabot[bot]
42fd0926ef Bump kotlin-stdlib from 1.5.21 to 1.5.30
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.5.21 to 1.5.30.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.21...v1.5.30)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-01 08:12:00 +02:00
ec202aa9a7 Merge pull request #1079 from hiqua/reimplement_custom_freq
Reimplement custom frequencies
2021-08-23 05:02:38 -05:00
Quentin Hibon
1fb56c8777 Fix typo 2021-08-22 17:36:59 +02:00
Quentin Hibon
a5d4a37da8 Improve digit constraints in frequency picker 2021-08-22 17:12:37 +02:00
Quentin Hibon
4804a48549 Reimplement custom frequencies
Closes #961.
2021-08-22 17:12:17 +02:00
Quentin Hibon
c892a845b4 Remove deprecated jcenter repository 2021-08-22 17:11:27 +02:00
Quentin Hibon
e98064b6a5 Update README.md: link guidelines 2021-08-22 15:11:42 +02:00
57f5f6ed5b Cycle through through all checkmark states 2021-08-22 06:23:06 -05:00
79f5b8b7e8 uhabits-server: Add missing dependencies 2021-08-22 05:15:45 -05:00
f15c660d33 Merge branch 'master' into dev 2021-08-21 07:40:28 -05:00
1866743c47 Remove absolute path to flock; change PATH in GH Actions 2021-08-21 07:22:51 -05:00
6b9a7917b4 Merge branch 'hotfix/2.0.3' 2021-08-21 06:39:47 -05:00
2a5725f382 Small tweaks to CheckmarkWidget padding and aspect ratio 2021-08-21 06:17:13 -05:00
edeabb6ee3 Update CHANGELOG and release notes 2021-08-21 05:07:57 -05:00
24a9fbe414 Update translations 2021-08-21 04:57:07 -05:00
e5b8c4c3c4 Update translations 2021-08-21 04:54:06 -05:00
Ganessh Kumar
a781a1f947 Updating links in README
Updating http links to https links. By using http links from browser - all of them are getting redirected to https automatically except http://www.gnu.org/licenses, which displays a warning message that the connection is not secure. Switching to https makes the connection secure as well.
2021-08-16 07:21:15 -05:00
Quentin Hibon
13e57b5026 Test isFailedToday 2021-08-06 06:14:16 -05:00
Quentin Hibon
f8c7abfff4 Use 'entered' instead of 'completed' when ? or skips are enabled 2021-08-06 06:14:16 -05:00
Quentin Hibon
7fe3ce970c Hide failed habits along with completed ones 2021-08-06 06:14:16 -05:00
9c395243f4 Merge pull request #1050 from hiqua/968_IndexOutOfBoundsException
Check position before moving habit
2021-08-06 06:02:36 -05:00
Quentin Hibon
b9eb244b0b Introduce HabitType and NumericalHabitType enums 2021-08-06 05:48:15 -05:00
Quentin Hibon
420a99f1cf Check position before moving habit
Workaround for #968.
2021-08-06 08:01:30 +02:00
e756a639ae Merge pull request #1043 from hiqua/965_illegal_state_exception
Handle target widget type in stacked widget
2021-08-04 20:33:29 -05:00
Quentin Hibon
91ff5f7a0c Use empty array instead of sentinel value -1 as habitId 2021-08-03 08:38:07 +02:00
Quentin Hibon
67b55a4ecf Fix off-by-one bug in StackWidgetService 2021-08-03 08:38:07 +02:00
Quentin Hibon
a5ae2eaa63 Improve one 'when' 2021-08-03 08:37:44 +02:00
Quentin Hibon
0bc2a8b6d4 Handle target widget type in stacked widget
Fixes #965.
2021-08-03 08:28:29 +02:00
Quentin Hibon
95a1786c4a build.sh: use full path for flock
Fixes #1044.
2021-08-02 08:30:38 +02:00
dependabot[bot]
caa1c9d72e Bump daggerVersion from 2.37 to 2.38.1
Bumps `daggerVersion` from 2.37 to 2.38.1.

Updates `dagger` from 2.37 to 2.38.1
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.37...dagger-2.38.1)

Updates `dagger-compiler` from 2.37 to 2.38.1
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.37...dagger-2.38.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-01 23:49:25 +02:00
dependabot[bot]
a7afe0b309 Bump logback-classic from 1.2.3 to 1.2.5
Bumps logback-classic from 1.2.3 to 1.2.5.

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-01 22:53:41 +02:00
dependabot[bot]
9c03174eef Bump material from 1.3.0 to 1.4.0
Bumps [material](https://github.com/material-components/material-components-android) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/material-components/material-components-android/releases)
- [Commits](https://github.com/material-components/material-components-android/compare/1.3.0...1.4.0)

---
updated-dependencies:
- dependency-name: com.google.android.material:material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-01 19:30:13 +02:00
dependabot[bot]
da02926fa6 Bump kotlin-stdlib-jdk8 from 1.5.20 to 1.5.21
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.5.20 to 1.5.21.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.20...v1.5.21)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-01 18:31:57 +02:00
Quentin Hibon
250dabfe58 Bump com.github.triplet.play from 3.2.0 to 3.5.0 2021-08-01 18:07:06 +02:00
dependabot[bot]
0bba3b76bc Bump kotlinx-coroutines-core-jvm from 1.4.2 to 1.5.1
Bumps [kotlinx-coroutines-core-jvm](https://github.com/Kotlin/kotlinx.coroutines) from 1.4.2 to 1.5.1.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.4.2...1.5.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-01 17:05:47 +02:00
dependabot[bot]
c2479278ba Bump ktorVersion from 1.6.1 to 1.6.2
Bumps `ktorVersion` from 1.6.1 to 1.6.2.

Updates `ktor-client-mock` from 1.6.1 to 1.6.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.1...1.6.2)

Updates `ktor-jackson` from 1.6.1 to 1.6.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.1...1.6.2)

Updates `ktor-client-android` from 1.6.1 to 1.6.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.1...1.6.2)

Updates `ktor-client-core` from 1.6.1 to 1.6.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.1...1.6.2)

Updates `ktor-client-jackson` from 1.6.1 to 1.6.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.1...1.6.2)

Updates `ktor-client-json` from 1.6.1 to 1.6.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.1...1.6.2)

Updates `ktor-server-netty` from 1.6.1 to 1.6.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.1...1.6.2)

Updates `ktor-server-core` from 1.6.1 to 1.6.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.1...1.6.2)

Updates `ktor-html-builder` from 1.6.1 to 1.6.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.1...1.6.2)

Updates `ktor-server-tests` from 1.6.1 to 1.6.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.1...1.6.2)

---
updated-dependencies:
- dependency-name: io.ktor:ktor-client-mock
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-jackson
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-jackson
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-json
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-html-builder
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-tests
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-01 14:00:24 +02:00
dependabot[bot]
499a403a06 Bump kotlin-stdlib from 1.5.20 to 1.5.21
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.5.20 to 1.5.21.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.20...v1.5.21)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-01 14:00:17 +02:00
dependabot[bot]
af5d622339 Bump opencsv from 5.4 to 5.5.1
Bumps opencsv from 5.4 to 5.5.1.

---
updated-dependencies:
- dependency-name: com.opencsv:opencsv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-01 10:33:09 +02:00
dependabot[bot]
5eeb54bc47 Bump kxCoroutinesVersion from 1.4.2 to 1.5.1
Bumps `kxCoroutinesVersion` from 1.4.2 to 1.5.1.

Updates `kotlinx-coroutines-android` from 1.4.2 to 1.5.1
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.4.2...1.5.1)

Updates `kotlinx-coroutines-core` from 1.4.2 to 1.5.1
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.4.2...1.5.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-01 10:32:46 +02:00
dependabot[bot]
e09e899aad Bump appcompat from 1.3.0 to 1.3.1
Bumps appcompat from 1.3.0 to 1.3.1.

---
updated-dependencies:
- dependency-name: androidx.appcompat:appcompat
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-01 10:32:19 +02:00
69f0fc6c3a Update CHANGELOG 2021-07-31 15:46:42 -05:00
705dfb9cbd Bitmap.createBitmap: Ensure width, height > 0
Fixes #966
2021-07-31 15:46:17 -05:00
d0ef749f19 StackWidget: Raise exception instead of returning invalid default value 2021-07-31 15:07:43 -05:00
b54711243f Remove color.toThemedAndroidColor
Fixes #907
2021-07-31 14:18:50 -05:00
37f03aca37 Merge branch 'hotfix/2.0.3' into dev 2021-07-31 12:49:01 -05:00
Quentin Hibon
271de59a94 Use notification timestamp when pressing "no"
Fixes #969.
2021-07-31 12:47:09 -05:00
Quentin Hibon
0ab55f6f5a Remove useless nullability 2021-07-30 21:12:33 +02:00
dependabot[bot]
43921721d4 Bump espressoVersion from 3.3.0 to 3.4.0
Bumps `espressoVersion` from 3.3.0 to 3.4.0.

Updates `espresso-contrib` from 3.3.0 to 3.4.0

Updates `espresso-core` from 3.3.0 to 3.4.0

---
updated-dependencies:
- dependency-name: androidx.test.espresso:espresso-contrib
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: androidx.test.espresso:espresso-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-03 23:37:26 +02:00
dependabot[bot]
33c88cded3 Bump rules from 1.3.0 to 1.4.0
Bumps rules from 1.3.0 to 1.4.0.

---
updated-dependencies:
- dependency-name: androidx.test:rules
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-03 18:48:12 +02:00
dependabot[bot]
aecce891ea Bump sqlite-jdbc from 3.36.0 to 3.36.0.1
Bumps [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.36.0 to 3.36.0.1.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.36.0...3.36.0.1)

---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-03 18:47:59 +02:00
dependabot[bot]
2ea98a7756 Bump ktorVersion from 1.6.0 to 1.6.1
Bumps `ktorVersion` from 1.6.0 to 1.6.1.

Updates `ktor-client-mock` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.0...1.6.1)

Updates `ktor-jackson` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.0...1.6.1)

Updates `ktor-client-android` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.0...1.6.1)

Updates `ktor-client-core` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.0...1.6.1)

Updates `ktor-client-jackson` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.0...1.6.1)

Updates `ktor-client-json` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.0...1.6.1)

Updates `ktor-server-netty` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.0...1.6.1)

Updates `ktor-server-core` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.0...1.6.1)

Updates `ktor-html-builder` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.0...1.6.1)

Updates `ktor-server-tests` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.6.0...1.6.1)

---
updated-dependencies:
- dependency-name: io.ktor:ktor-client-mock
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-jackson
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-jackson
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-client-json
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-html-builder
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.ktor:ktor-server-tests
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-03 18:47:52 +02:00
dependabot[bot]
e667872d83 Bump junit from 1.1.2 to 1.1.3
Bumps junit from 1.1.2 to 1.1.3.

---
updated-dependencies:
- dependency-name: androidx.test.ext:junit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-03 18:47:47 +02:00
Quentin Hibon
3602a614c4 dependabot: do monthly checks rather than daily 2021-07-01 08:02:40 +02:00
dependabot[bot]
d8c5f4d93c Bump sqlite-jdbc from 3.34.0 to 3.36.0
Bumps [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.34.0 to 3.36.0.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.34.0...3.36.0)

---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-28 08:23:03 +02:00
dependabot[bot]
c9f4df9dae Bump kotlin-stdlib-jdk8 from 1.5.10 to 1.5.20
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.5.10 to 1.5.20.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.20/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.10...v1.5.20)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-25 08:26:27 +02:00
dependabot[bot]
feb384bca6 Bump kotlin-stdlib from 1.5.10 to 1.5.20
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.5.10 to 1.5.20.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.20/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.10...v1.5.20)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-25 08:26:21 +02:00
dependabot[bot]
71e9160460 Bump daggerVersion from 2.36 to 2.37
Bumps `daggerVersion` from 2.36 to 2.37.

Updates `dagger` from 2.36 to 2.37
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.36...dagger-2.37)

Updates `dagger-compiler` from 2.36 to 2.37
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.36...dagger-2.37)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-11 10:37:47 +02:00
Quentin Hibon
64966d3c86 Bumps org.jlleitschuh.gradle.ktlint from 10.0.0 to 10.1.0 2021-06-09 12:06:35 +02:00
dependabot[bot]
4787df4074 Bump simpleclient_hotspot from 0.10.0 to 0.11.0
Bumps [simpleclient_hotspot](https://github.com/prometheus/client_java) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.10.0...parent-0.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-09 11:57:42 +02:00
92291fd919 Fix dates before the year 2000 2021-06-05 18:45:15 -05:00
be51538704 Avoid calling textPaint.getTextBounds repeatedly
This operation seems to be very expensive on some Samsung phones,
which causes ANRs.

Fixes #962
2021-06-05 18:19:03 -05:00
89b24911ba Fix imports 2021-06-05 18:18:25 -05:00
1cf71b3973 Use dark theme in HabitPickerDialog.kt
Fixes #916
2021-06-05 17:26:55 -05:00
2fe3b15806 Fix small issues with the pure black theme 2021-06-05 17:17:27 -05:00
33468bfc1c Improve automatic checkmarks for monthly habits
Fixes #947
2021-06-05 16:54:13 -05:00
dependabot[bot]
5908692a5c Bump ktorVersion from 1.5.4 to 1.6.0 (#943)
Bumps `ktorVersion` from 1.5.4 to 1.6.0.

Updates `ktor-client-mock` from 1.5.4 to 1.6.0
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.4...1.6.0)

Updates `ktor-jackson` from 1.5.4 to 1.6.0
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.4...1.6.0)

Updates `ktor-client-android` from 1.5.4 to 1.6.0
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.4...1.6.0)

Updates `ktor-client-core` from 1.5.4 to 1.6.0
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.4...1.6.0)

Updates `ktor-client-jackson` from 1.5.4 to 1.6.0
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.4...1.6.0)

Updates `ktor-client-json` from 1.5.4 to 1.6.0
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.4...1.6.0)

Updates `ktor-server-netty` from 1.5.4 to 1.6.0
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.4...1.6.0)

Updates `ktor-server-core` from 1.5.4 to 1.6.0
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.4...1.6.0)

Updates `ktor-html-builder` from 1.5.4 to 1.6.0
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.4...1.6.0)

Updates `ktor-server-tests` from 1.5.4 to 1.6.0
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.4...1.6.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-05 10:08:34 -05:00
dependabot[bot]
693dce8719 Bump simpleclient_httpserver from 0.10.0 to 0.11.0 (#942)
Bumps [simpleclient_httpserver](https://github.com/prometheus/client_java) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.10.0...parent-0.11.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-05 10:08:09 -05:00
b232827dfd Update bug_report.md 2021-05-31 13:14:30 -05:00
dependabot[bot]
02f9f411ce Bump simpleclient from 0.10.0 to 0.11.0 (#941)
Bumps [simpleclient](https://github.com/prometheus/client_java) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.10.0...parent-0.11.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-31 13:12:25 -05:00
bbf9da44e1 Update bug_report.md 2021-05-29 08:07:17 -05:00
dependabot[bot]
ee896fb4f9 Bump kotlin-stdlib from 1.5.0 to 1.5.10 (#931)
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.5.0 to 1.5.10.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.0...v1.5.10)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-26 20:40:31 -05:00
dependabot[bot]
4d7d8b6206 Bump kotlin-stdlib-jdk8 from 1.5.0 to 1.5.10 (#932)
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.5.0 to 1.5.10.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.0...v1.5.10)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-26 20:40:18 -05:00
dependabot[bot]
55b841a8b4 Bump daggerVersion from 2.35.1 to 2.36 (#933)
Bumps `daggerVersion` from 2.35.1 to 2.36.

Updates `dagger` from 2.35.1 to 2.36
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.35.1...dagger-2.36)

Updates `dagger-compiler` from 2.35.1 to 2.36
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.35.1...dagger-2.36)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-26 06:47:10 -05:00
7fac86b617 Update bug_report.md 2021-05-23 19:04:32 -05:00
dependabot[bot]
c31d42be2d Bump com.github.johnrengelman.shadow from 6.1.0 to 7.0.0
Bumps com.github.johnrengelman.shadow from 6.1.0 to 7.0.0.

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-23 18:45:05 -05:00
31c09b9c0b Upgrade to Gradle 7.0 and Kotlin 1.5.0 2021-05-23 18:33:57 -05:00
dependabot[bot]
db91dce57f Bump appcompat from 1.2.0 to 1.3.0 (#912)
Bumps appcompat from 1.2.0 to 1.3.0.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-23 18:01:18 -05:00
12c76245e6 Merge branch 'master' into dev 2021-05-23 17:47:14 -05:00
2163a2b93b Update CHANGELOG.md 2021-05-23 17:39:34 -05:00
afad56ab91 Update test screenshots; automatically fetch 2021-05-23 15:34:59 -05:00
ece1b93f8d GitHub Actions: Increase number of attempts 2021-05-23 11:56:50 -05:00
10416e40fa Update CHANGELOG.md 2021-05-23 11:51:39 -05:00
88f8581acc Make CheckmarkWidget resizable; remove fixed aspect ratio 2021-05-23 11:49:49 -05:00
b33dd2a994 Ensure RingView.diameter is never zero
In rare cases, it seems either that `onDraw` is called before `onMeasure` or
that `onMeasure` is called with a view that has zero height/width. This causes
`reallocateCache` to produce an IllegalArgumentException. This patch ensures
that diameter is never zero.

Fixes #904
2021-05-23 11:21:49 -05:00
d87961d800 Fix missing placeholder in some translations; update remaining ones
Fixes #926
2021-05-23 10:50:26 -05:00
38d2606d6d Fix IllegalStateException in androidx.customview.view
Fixes #906
2021-05-22 12:53:03 -05:00
0a91c097e8 Update CHANGELOG 2021-05-21 19:42:37 -05:00
sumanabhi
b1c53bd820 Added the Decimal Support while entering target for any Habit. 2021-05-21 19:40:47 -05:00
c973f93424 Fix small issues with font size 2021-05-15 20:22:42 -05:00
fcadbe7c38 Handle numerical habits with target value of zero
Fixes #903
2021-05-15 20:11:20 -05:00
59a4d7552c Update translations; reorganize play/listings 2021-05-09 18:03:04 -05:00
9d7840bdd1 Merge branch 'master' into dev 2021-05-09 17:24:50 -05:00
89e3dd7655 Update CHANGELOG 2021-05-09 17:18:16 -05:00
df56608a5d Re-add signing config 2021-05-09 17:04:42 -05:00
3489f176d6 translators: Remove debug statements 2021-05-09 17:04:16 -05:00
75fdd9d2b1 Temporarily remove outdated publish.yml workflow 2021-05-09 16:31:23 -05:00
dd1999681f Small adjustments to numeric checkmark widget 2021-05-09 16:24:59 -05:00
Quentin Hibon
32db4e363b Add missing dependency to github workflow (#894) 2021-05-02 18:41:34 -05:00
dependabot[bot]
004bb8d71c Bump daggerVersion from 2.34.1 to 2.35.1
Bumps `daggerVersion` from 2.34.1 to 2.35.1.

Updates `dagger` from 2.34.1 to 2.35.1
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.34.1...dagger-2.35.1)

Updates `dagger-compiler` from 2.34.1 to 2.35.1
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.34.1...dagger-2.35.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-01 16:07:49 +02:00
dependabot[bot]
21a1e88c47 Bump ktorVersion from 1.5.3 to 1.5.4
Bumps `ktorVersion` from 1.5.3 to 1.5.4.

Updates `ktor-client-mock` from 1.5.3 to 1.5.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.3...1.5.4)

Updates `ktor-jackson` from 1.5.3 to 1.5.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.3...1.5.4)

Updates `ktor-client-android` from 1.5.3 to 1.5.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.3...1.5.4)

Updates `ktor-client-core` from 1.5.3 to 1.5.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.3...1.5.4)

Updates `ktor-client-jackson` from 1.5.3 to 1.5.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.3...1.5.4)

Updates `ktor-client-json` from 1.5.3 to 1.5.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.3...1.5.4)

Updates `ktor-server-netty` from 1.5.2 to 1.5.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.2...1.5.4)

Updates `ktor-server-core` from 1.5.2 to 1.5.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.2...1.5.4)

Updates `ktor-html-builder` from 1.5.2 to 1.5.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.2...1.5.4)

Updates `ktor-server-tests` from 1.5.2 to 1.5.4
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.2...1.5.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-01 00:38:37 +02:00
dependabot[bot]
86fb718896 Bump appintro from 3.4.0 to 4.1.0
Bumps [appintro](https://github.com/PaoloRotolo/AppIntro) from 3.4.0 to 4.1.0.
- [Release notes](https://github.com/PaoloRotolo/AppIntro/releases)
- [Changelog](https://github.com/AppIntro/AppIntro/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PaoloRotolo/AppIntro/commits/v4.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-01 00:38:10 +02:00
dependabot[bot]
a4e9b2f874 Bump kotlin-stdlib-jdk8 from 1.4.32 to 1.5.0
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.4.32 to 1.5.0.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-30 17:09:04 +02:00
dependabot[bot]
ac924470b8 Bump kotlin-stdlib from 1.4.32 to 1.5.0
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.4.32 to 1.5.0.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-30 17:08:54 +02:00
63883032c4 Update screenshots and description 2021-04-29 21:32:17 -05:00
a8c9b1b71c Update CHANGELOG 2021-04-29 19:35:46 -05:00
61529fde4d Update translations 2021-04-29 19:02:35 -05:00
1050cc4e47 GitHub Actions: Enable APIs 23 to 28 2021-04-26 21:24:29 -05:00
a7845c9290 Make large-tests pass on API 23 2021-04-26 21:21:51 -05:00
1feefe107c Make large-tests pass on API 25 2021-04-26 18:28:37 -05:00
1654ff9af3 GitHub Actions: Enable API 26 2021-04-25 23:56:53 -05:00
58adff6a22 build.sh: Run tests in parallel 2021-04-25 23:46:34 -05:00
2728c311d8 Large tests: Make compatible with API 27 2021-04-25 19:45:02 -05:00
b561dfe90d GitHub Actions: Large tests 2021-04-24 21:27:01 -05:00
53a40b2cfa Update translations 2021-04-22 23:18:42 -05:00
98ce802f87 Remove useless statement 2021-04-22 23:11:41 -05:00
853b4275be Parse translators from Crowdin report; group by language
Fixes #669
2021-04-22 23:06:35 -05:00
df4355c072 Switch to androidx.preference.PreferenceManger 2021-04-18 22:17:25 -05:00
33c3feb11a Make FrequencyPickerDialog translatable 2021-04-18 10:34:35 -05:00
f88a9bd46a Remove -alpha from version name 2021-04-18 10:04:56 -05:00
5dd9f43464 Update translations 2021-04-18 09:57:34 -05:00
4a13623b2c Update translations 2021-04-18 09:26:12 -05:00
6b368bffdf Update measurable_example 2021-04-18 09:09:46 -05:00
8d87988871 Add arrows to sort menu 2021-04-18 09:02:40 -05:00
256ca13dca Small tweaks to preferences screen; restore default accent color 2021-04-18 07:29:03 -05:00
b0c5552cfa Remove unused imports 2021-04-17 22:01:17 -05:00
616ab4861d CheckmarkWidget: Always show circle
Fixes #790
2021-04-17 21:56:50 -05:00
fcff067b2e DatePicker: Implement dark theme
Fixes #858
2021-04-17 21:52:00 -05:00
da018fc64d Temporarily remove device sync 2021-04-17 19:53:24 -05:00
f27a9f9103 Revert to ktor 1.5.2
Newer version seems to require unpublished dependencies.
2021-04-17 19:35:28 -05:00
engineering4good
fe59565ded Fix app crash on habit deletion when sorted not manually. (#874) 2021-04-17 06:31:19 -05:00
dependabot[bot]
419d2faa78 Bump daggerVersion from 2.34 to 2.34.1
Bumps `daggerVersion` from 2.34 to 2.34.1.

Updates `dagger` from 2.34 to 2.34.1
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.34...dagger-2.34.1)

Updates `dagger-compiler` from 2.34 to 2.34.1
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.34...dagger-2.34.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-14 09:13:26 +02:00
dependabot[bot]
55f3bab13a Bump daggerVersion from 2.33 to 2.34
Bumps `daggerVersion` from 2.33 to 2.34.

Updates `dagger` from 2.33 to 2.34
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.33...dagger-2.34)

Updates `dagger-compiler` from 2.33 to 2.34
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.33...dagger-2.34)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-08 11:54:09 +02:00
dependabot[bot]
212cc4259b Bump ktorVersion from 1.5.2 to 1.5.3
Bumps `ktorVersion` from 1.5.2 to 1.5.3.

Updates `ktor-client-mock` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-jackson` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-client-android` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-client-core` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-client-jackson` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-client-json` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-server-netty` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-server-core` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-html-builder` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-server-tests` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-05 11:09:10 +02:00
Quentin Hibon
e1ec8cfa10 Fix build instructions link in README.md
Fixes #871
2021-04-04 17:16:57 +02:00
Quentin Hibon
6af2edb690 Delete v21 resources (#864) 2021-04-01 06:12:37 -05:00
dependabot[bot]
9d6b3ebb25 Bump annotation from 1.1.0 to 1.2.0
Bumps annotation from 1.1.0 to 1.2.0.

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-25 09:38:54 +01:00
dependabot[bot]
ed0744d5ab Bump kotlin-stdlib-jdk8 from 1.4.31 to 1.4.32
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.4.31 to 1.4.32.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-25 09:38:32 +01:00
dependabot[bot]
b59886dc77 Bump kotlin-stdlib from 1.4.31 to 1.4.32
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.4.31 to 1.4.32.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-23 18:40:03 +01:00
dependabot[bot]
23954eed27 Bump guava from 30.1-android to 30.1.1-android
Bumps [guava](https://github.com/google/guava) from 30.1-android to 30.1.1-android.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-22 14:12:50 +01:00
071b6bd090 HeaderView: Fix padding 2021-03-18 22:23:58 -05:00
298bf1a538 BarChart: Fix small bars 2021-03-18 22:16:26 -05:00
8b2285787c Fix numerical spinner in BarCardView 2021-03-18 22:09:54 -05:00
c83cd5fd10 Render YES_AUTO as outlined checkmark 2021-03-18 22:04:23 -05:00
381c67d020 Allow unitless numerical habits 2021-03-18 22:04:23 -05:00
81cffc7253 Fix dialog text color 2021-03-18 22:04:23 -05:00
e745b959ca Fix multiple selection 2021-03-18 22:04:23 -05:00
dependabot[bot]
d2ee210376 Bump opencsv from 5.3 to 5.4 (#849)
Bumps opencsv from 5.3 to 5.4.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-15 16:56:19 -05:00
Quentin Hibon
9c81f22a4d Start snooze activity after later is selected from lock screen (#840)
Fixes #787.
2021-03-15 08:34:42 -05:00
51947576aa HistoryEditorDialog: Use system theme 2021-03-14 09:17:26 -05:00
dependabot[bot]
6411f65fa5 Bump commons-lang3 from 3.11 to 3.12.0 (#833)
Bumps commons-lang3 from 3.11 to 3.12.0.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-13 19:57:40 -06:00
dependabot[bot]
a04349bfaa Bump ktorVersion from 1.5.1 to 1.5.2 (#832)
Bumps `ktorVersion` from 1.5.1 to 1.5.2.

Updates `ktor-client-mock` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-jackson` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-client-android` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-client-core` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-client-jackson` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-client-json` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-server-netty` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-server-core` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-html-builder` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-server-tests` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-13 19:31:56 -06:00
7b68938e14 ButtonView: Adjust size of question marks 2021-03-13 18:45:18 -06:00
ee462715de Use different colors for YES_AUTO and NO; increase contrast slightly 2021-03-13 18:44:04 -06:00
a95da72e19 Attempt to make EntryPanelViewTest less flaky 2021-03-13 16:58:27 -06:00
3ece80f3da Remove unused class and resource 2021-03-13 16:35:27 -06:00
dependabot[bot]
e00ff99af7 Bump kotlin-stdlib-jdk8 from 1.4.30 to 1.4.31 (#821) 2021-03-11 06:20:02 -06:00
Quentin Hibon
fc26d7967f Make validation errors readable (#837)
Fixes #757.
2021-03-10 20:37:43 -06:00
9b753b07f8 Temporarily disable flaky test 2021-03-10 20:25:06 -06:00
dependabot[bot]
73deb535ef Bump kotlin-stdlib from 1.4.30 to 1.4.31 (#820)
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.4.30 to 1.4.31.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-07 11:01:03 -06:00
dependabot[bot]
a733e6ddf0 Bump daggerVersion from 2.32 to 2.33 (#819)
Bumps `daggerVersion` from 2.32 to 2.33.

Updates `dagger` from 2.32 to 2.33
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.32...dagger-2.33)

Updates `dagger-compiler` from 2.32 to 2.33
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.32...dagger-2.33)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-07 11:00:49 -06:00
dependabot[bot]
86c7200e6b Bump desugar_jdk_libs from 1.1.1 to 1.1.5 (#818)
Bumps [desugar_jdk_libs](https://github.com/google/desugar_jdk_libs) from 1.1.1 to 1.1.5.
- [Release notes](https://github.com/google/desugar_jdk_libs/releases)
- [Changelog](https://github.com/google/desugar_jdk_libs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/desugar_jdk_libs/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-07 11:00:35 -06:00
dependabot[bot]
15282e7ea6 Bump kotlin-css-jvm (#809)
Bumps kotlin-css-jvm from 1.0.0-pre.144-kotlin-1.4.30 to 1.0.0-pre.148-kotlin-1.4.30.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-22 07:49:12 -06:00
Quentin Hibon
96f87df052 Implement task to generate translator layout from a text file (#759)
Related to #669
2021-02-22 07:46:52 -06:00
dependabot[bot]
bc623f044d Bump dexmaker-mockito from 2.28.0 to 2.28.1
Bumps [dexmaker-mockito](https://github.com/linkedin/dexmaker) from 2.28.0 to 2.28.1.
- [Release notes](https://github.com/linkedin/dexmaker/releases)
- [Changelog](https://github.com/linkedin/dexmaker/blob/master/CHANGELOG.md)
- [Commits](https://github.com/linkedin/dexmaker/compare/2.28.0...2.28.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-15 21:03:51 -06:00
dependabot[bot]
773eef26e7 Bump junit from 4.13.1 to 4.13.2
Bumps [junit](https://github.com/junit-team/junit4) from 4.13.1 to 4.13.2.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.13.1.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.13.1...r4.13.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-15 21:03:22 -06:00
b58af03a7c HabitBullCSVImporter: Accept multiple date formats
Fixes 762
2021-02-13 18:00:22 -06:00
c53997ffcc Update fa_star_half_o unicode 2021-02-13 09:02:17 -06:00
11d55bbf02 Write failing tests for EmptyListViewTest 2021-02-13 09:01:54 -06:00
Quentin Hibon
50ebff3edf Adapt message when all habits are completed
Closes #700.
2021-02-13 08:14:40 -06:00
8e1aa3d01e Merge pull request #784 from hiqua/fontawesome
Upgrade fontawesome to 5.15.2
2021-02-13 08:12:25 -06:00
dependabot[bot]
ea66cf04b3 Bump test-butler-library from 2.1.1 to 2.2.1 (#788)
Bumps [test-butler-library](https://github.com/linkedin/test-butler) from 2.1.1 to 2.2.1.
- [Release notes](https://github.com/linkedin/test-butler/releases)
- [Changelog](https://github.com/linkedin/test-butler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/linkedin/test-butler/compare/2.1.1...2.2.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-12 07:09:11 -06:00
Quentin Hibon
b1da72dc3a Bump org.jlleitschuh.gradle.ktlint from 9.4.1 to 10.0.0 (#786) 2021-02-12 07:07:39 -06:00
Quentin Hibon
91bd17bb9e Upgrade fontawesome to 5.15.2 2021-02-10 16:06:55 +01:00
fca9557108 Merge pull request #776 from hiqua/fix_766
Restore notification sound customization setting
2021-02-09 07:36:31 -06:00
dependabot[bot]
d76a4a84d0 Bump daggerVersion from 2.31.2 to 2.32 (#779)
Bumps `daggerVersion` from 2.31.2 to 2.32.

Updates `dagger` from 2.31.2 to 2.32
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.31.2...dagger-2.32)

Updates `dagger-compiler` from 2.31.2 to 2.32
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.31.2...dagger-2.32)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-09 07:33:57 -06:00
Quentin Hibon
8790c0e87b Delete snooze_interval preference 2021-02-09 10:14:25 +01:00
Quentin Hibon
bc461e1239 Restore notification sound customization setting
For devices older than Android Oreo, notification sound customization has been
disabled since aadfac68cd. We enable it again.

Fixes #766.
2021-02-09 09:22:53 +01:00
589fd2f0f1 build.sh: Restore fetch-images and accept-images 2021-02-08 21:38:15 -06:00
dependabot[bot]
2e94bebcac Bump material from 1.2.1 to 1.3.0 (#764)
Bumps [material](https://github.com/material-components/material-components-android) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/material-components/material-components-android/releases)
- [Commits](https://github.com/material-components/material-components-android/compare/1.2.1...1.3.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-08 21:26:35 -06:00
dependabot[bot]
ff748b27a5 Bump kotlin-css-jvm (#763)
Bumps kotlin-css-jvm from 1.0.0-pre.144-kotlin-1.4.21 to 1.0.0-pre.144-kotlin-1.4.30.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-08 21:26:20 -06:00
dependabot[bot]
8522318ed1 Bump kotlin-stdlib from 1.4.21 to 1.4.30 (#761)
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.4.21 to 1.4.30.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.4.21...v1.4.30)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-08 21:25:56 -06:00
dependabot[bot]
1f08d2f71c Bump kotlin-stdlib-jdk8 from 1.4.21 to 1.4.30 (#760)
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.4.21 to 1.4.30.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.4.21...v1.4.30)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-08 21:25:48 -06:00
Quentin Hibon
7fb3489ca8 Fix shellcheck warnings (#778) 2021-02-08 21:23:26 -06:00
129c86a030 about.xml: Sort developers by number of commits 2021-01-31 11:35:44 -06:00
e4121b2564 Merge branch 'master' into dev 2021-01-30 21:41:14 -06:00
98abebe099 Merge branch 'hotfix/v1.8.12' 2021-01-30 20:47:36 -06:00
0f86cb4d53 Update list of developers 2021-01-30 20:39:19 -06:00
Kristian Tashkov
4dd77463fb Update widgets at midnight (#634) 2021-01-30 20:36:37 -06:00
Quentin Hibon
2cf3347f8c Set dataOffset when attaching a new CardView
Fixes #713.
2021-01-30 20:15:26 -06:00
5516f40571 Bump version to 1.8.12; update CHANGELOG and release notes 2021-01-30 19:53:57 -06:00
c006659ba4 Use Nexus 4 screen size in build.sh; adjust BackupSteps accordingly 2021-01-30 19:42:10 -06:00
5be2c51d79 Regression tests: minor code cleanup 2021-01-30 19:22:32 -06:00
Quentin Hibon
2dcce080d3 Set dataOffset when attaching a new CardView
Fixes #713.
2021-01-30 18:36:07 -06:00
Quentin Hibon
6c3b4135c2 Implement test reproducing #713 2021-01-30 18:36:07 -06:00
48c1adb3bb HabitCardListAdapter: Return copy of list of selected items
Previously, HabitCardListAdapter returned a pointer to the list, instead of a
copy. By the time other parts of the application were reading the list, its
contents had already changed. This prevented the user from deleting or
archiving habits.
2021-01-30 10:28:42 -06:00
89bde4c9ae verifyDisplayGraphs: Update class names 2021-01-30 09:49:35 -06:00
a7e2e0e8da Acceptance tests: fix imports; remove unused function 2021-01-30 08:45:43 -06:00
64d77fbb6b build.sh: Use avdmanager from cmdline-tools 2021-01-30 08:30:14 -06:00
Quentin Hibon
4b80e60b2b Fix typo (#755) 2021-01-30 07:48:09 -06:00
dependabot[bot]
0f80505735 Bump guava from 30.0-android to 30.1-android (#750)
Bumps [guava](https://github.com/google/guava) from 30.0-android to 30.1-android.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-28 21:37:59 -06:00
dependabot[bot]
c26c140310 Bump ktorVersion from 1.5.0 to 1.5.1 (#751)
Bumps `ktorVersion` from 1.5.0 to 1.5.1.

Updates `ktor-client-mock` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-jackson` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-client-android` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-client-core` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-client-jackson` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-client-json` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-server-netty` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-server-core` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-html-builder` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-server-tests` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-28 21:37:22 -06:00
dependabot[bot]
c05e008569 Bump sqlite-jdbc from 3.25.2 to 3.34.0 (#748)
Bumps [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.25.2 to 3.34.0.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.25.2...3.34.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-28 21:35:48 -06:00
a5255690ed Revert to Kotlin 1.4.21
Kotlin 1.4.21-2 seems to be a pre-release.
2021-01-28 21:35:08 -06:00
56f0bbb7bd Remove unused equalsverifier dependency 2021-01-28 21:35:08 -06:00
4e72bf93f8 Issue templates: sort feature requests by popularity 2021-01-28 08:04:07 -06:00
d31e42446e Add "Help & FAQ" to issue template 2021-01-28 07:59:25 -06:00
dependabot[bot]
8ea71dc2b5 Bump kotlin-css-jvm (#744)
Bumps kotlin-css-jvm from 1.0.0-pre.143-kotlin-1.4.21 to 1.0.0-pre.144-kotlin-1.4.21.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-28 07:11:08 -06:00
3ba26ac67e Merge pull request #747 from iSoron/dependabot/gradle/org.hamcrest-hamcrest-2.2
Bump hamcrest from 2.1 to 2.2
2021-01-28 07:01:51 -06:00
dependabot[bot]
8537e0f910 Bump hamcrest from 2.1 to 2.2
Bumps [hamcrest](https://github.com/hamcrest/JavaHamcrest) from 2.1 to 2.2.
- [Release notes](https://github.com/hamcrest/JavaHamcrest/releases)
- [Changelog](https://github.com/hamcrest/JavaHamcrest/blob/master/CHANGES.md)
- [Commits](https://github.com/hamcrest/JavaHamcrest/compare/v2.1...v2.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-28 07:17:40 +00:00
a6c9ea22e6 Merge branch 'midnight_delay_option_2' into dev 2021-01-27 20:06:44 -06:00
5767817de2 Midnight delay: Make text shorter 2021-01-27 20:06:31 -06:00
b80344a443 Merge pull request #743 from hiqua/update_mockito
Delete obsolete mockito dependencies
2021-01-27 20:01:40 -06:00
f36bc788c7 Merge pull request #740 from hiqua/sdk_30
Increase targetSdk to 30
2021-01-27 19:59:13 -06:00
dependabot[bot]
22136774de Bump simpleclient_hotspot from 0.9.0 to 0.10.0 (#742)
Bumps [simpleclient_hotspot](https://github.com/prometheus/client_java) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.9.0...parent-0.10.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-27 19:57:38 -06:00
dependabot[bot]
be39237a22 Bump simpleclient from 0.9.0 to 0.10.0 (#741)
Bumps [simpleclient](https://github.com/prometheus/client_java) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.9.0...parent-0.10.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-27 19:56:24 -06:00
dependabot[bot]
836eebd20b Bump kotlin-stdlib-jdk8 from 1.4.21 to 1.4.21-2 (#738)
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.4.21 to 1.4.21-2.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.4.21...v1.4.21-2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-27 19:54:55 -06:00
Quentin Hibon
8d2aebaf7f Delete obsolete mockito dependencies 2021-01-27 15:44:22 +01:00
dependabot[bot]
1c2efb6c22 Bump junit from 4.12 to 4.13.1 (#737) 2021-01-27 07:13:46 -06:00
dependabot[bot]
784877871a Bump opencsv from 3.10 to 5.3 (#735) 2021-01-27 07:13:27 -06:00
Quentin Hibon
4a2fb2ac47 Fix visual glitch on popups when using dark theme (#730) 2021-01-27 07:11:40 -06:00
dependabot[bot]
7caf22bd7a Bump ktorVersion from 1.4.2 to 1.5.0 (#728) 2021-01-27 07:11:06 -06:00
Quentin Hibon
2d943b5942 Fix signature of onSharedPreferenceChanged
The 'key' argument is null when called from android.app.SharedPreferencesImpl.
2021-01-27 12:09:23 +01:00
Quentin Hibon
dd4e0ee6f9 Increase targetSdk to 30 2021-01-27 11:00:50 +01:00
Quentin Hibon
bb8d4abb9e Implement the midnight delay option
Closes #694.
2021-01-27 09:52:28 +01:00
dependabot[bot]
64069a6e7f Bump kotlin-stdlib from 1.4.21 to 1.4.21-2 (#734)
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.4.21 to 1.4.21-2.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.4.21...v1.4.21-2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-26 22:12:35 -06:00
dependabot[bot]
9ead803b6c Bump logback-classic from 1.2.1 to 1.2.3 (#733)
Bumps logback-classic from 1.2.1 to 1.2.3.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-26 22:12:19 -06:00
dependabot[bot]
af6387f1fc Bump kotlin-css-jvm (#731)
Bumps kotlin-css-jvm from 1.0.0-pre.31-kotlin-1.2.41 to 1.0.0-pre.143-kotlin-1.4.21.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-26 22:12:03 -06:00
dependabot[bot]
6d0764bbb8 Bump simpleclient_httpserver from 0.9.0 to 0.10.0
Bumps [simpleclient_httpserver](https://github.com/prometheus/client_java) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.9.0...parent-0.10.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-26 20:10:44 -06:00
dependabot[bot]
eb9d017882 Bump commons-lang3 from 3.5 to 3.11
Bumps commons-lang3 from 3.5 to 3.11.

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-26 20:07:14 -06:00
dependabot[bot]
ec630ad1b1 Bump test-butler-library from 1.3.1 to 2.1.1
Bumps [test-butler-library](https://github.com/linkedin/test-butler) from 1.3.1 to 2.1.1.
- [Release notes](https://github.com/linkedin/test-butler/releases)
- [Changelog](https://github.com/linkedin/test-butler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/linkedin/test-butler/compare/1.3.1...2.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-26 20:06:59 -06:00
Quentin Hibon
df30c7c764 Disable transparency for stacked widgets
Closes #687.
2021-01-26 20:06:12 -06:00
dependabot[bot]
7a73f9c8c7 Bump daggerVersion from 2.25.4 to 2.31.2 (#725) 2021-01-25 08:04:49 -06:00
045612c00f Add Dependabot configuration file 2021-01-25 07:10:40 -06:00
25d3587545 Add hiqua to list of developers 2021-01-25 06:51:26 -06:00
4ffd78545d Merge pull request #716 from hiqua/dev 2021-01-25 06:43:13 -06:00
Quentin Hibon
14d018c327 Convert Timestamp to data class 2021-01-25 12:18:05 +01:00
Quentin Hibon
f1c88797a3 Clean up code after conversions 2021-01-25 12:18:05 +01:00
Quentin Hibon
f882e18be9 Convert BaseUserInterfaceTest 2021-01-25 12:18:05 +01:00
Quentin Hibon
0fc9bb57ae Convert BaseViewTest 2021-01-25 12:18:05 +01:00
Quentin Hibon
22dcd9f7ae Convert AndroidTaskRunner 2021-01-25 12:18:05 +01:00
Quentin Hibon
7d361b2203 Convert Task and TaskRunner 2021-01-25 12:18:05 +01:00
Quentin Hibon
8131d37d8e Convert SingleThreadTaskRunner 2021-01-25 12:18:05 +01:00
Quentin Hibon
6485c3efee Convert ExportCSVTask 2021-01-25 12:18:05 +01:00
Quentin Hibon
2bfbff9b14 Convert ExportDBTask and ImportDataTask 2021-01-25 12:18:05 +01:00
Quentin Hibon
9a72141567 Convert PerformanceTest 2021-01-25 12:18:05 +01:00
Quentin Hibon
6992b5186e Clean up code after conversions 2021-01-25 12:18:05 +01:00
Quentin Hibon
18db571507 Properly check that a setter is never used 2021-01-25 12:18:05 +01:00
Quentin Hibon
09794ccb68 Move ThingRecord back into RepositoryTest 2021-01-25 12:18:05 +01:00
Quentin Hibon
7644f52dfd Don't open ThingRecord 2021-01-25 12:18:05 +01:00
Quentin Hibon
21fa636e0c Convert BaseAndroidTest 2021-01-25 12:18:05 +01:00
Quentin Hibon
df755d30ee Convert HabitsApplicationTest 2021-01-25 12:18:05 +01:00
Quentin Hibon
7f0c4626b0 Convert HabitFixtures (androidtest) 2021-01-25 12:18:05 +01:00
Quentin Hibon
ec42fda336 Convert AndroidDatabaseTest 2021-01-25 12:18:05 +01:00
Quentin Hibon
def9ff9746 Convert activities.common.views (androidTest) 2021-01-25 12:18:05 +01:00
Quentin Hibon
a7df0bde3e Convert core.models.sqlite 2021-01-25 12:18:05 +01:00
Quentin Hibon
1cec5a6067 Convert model memory 2021-01-25 12:18:05 +01:00
Quentin Hibon
a58cbffb81 Convert HabitList and ModelObservable 2021-01-25 12:18:05 +01:00
Quentin Hibon
30630c3358 Convert Timestamp 2021-01-25 12:18:05 +01:00
Quentin Hibon
98f9693cff Convert views 2021-01-25 12:18:05 +01:00
Quentin Hibon
228be95f9c convert widget tests 2021-01-25 12:18:05 +01:00
Quentin Hibon
457c58a660 Convert RepositoryTest 2021-01-25 12:18:05 +01:00
Quentin Hibon
39cec6f11d Convert Preferences 2021-01-25 12:18:05 +01:00
Quentin Hibon
8f5f72d9fd Convert ReminderScheduler 2021-01-25 10:56:59 +01:00
Quentin Hibon
b21eb3f118 Finish uhabits-core ui conversion 2021-01-25 10:56:59 +01:00
Quentin Hibon
136ec5b49b Convert most of code remaining in uhabits-core 2021-01-25 10:56:59 +01:00
Quentin Hibon
e84cc8e8b1 Convert HabitCardListCache 2021-01-25 10:56:59 +01:00
Quentin Hibon
26fb76f95f Add mockitokotlin dependency to androidTest 2021-01-25 10:56:59 +01:00
Quentin Hibon
68a8f9d356 Enable mockito inline extension 2021-01-25 10:56:59 +01:00
Quentin Hibon
f541f47476 Use correct BREAK_STRATEGY_BALANCED constant 2021-01-25 10:56:59 +01:00
Quentin Hibon
9d4cfbd270 Fix preferences 2021-01-25 10:56:59 +01:00
1869d05591 ScoreTest: Use static imports for hamcrest 2021-01-21 06:46:23 -06:00
3f8b1008b4 Merge branch 'feature/gradle.kts' into dev 2021-01-21 06:41:34 -06:00
e671949dd2 Merge pull request #709 from hiqua/dev 2021-01-21 06:24:11 -06:00
Quentin Hibon
dedeb13f46 Clean up kotlin code
* static imports
* less nullable types
* format
2021-01-19 14:06:18 +01:00
Quentin Hibon
9d0fbb9ea9 Convert WeekdayList 2021-01-18 16:13:19 +01:00
Quentin Hibon
97dcf98e2b Convert org.isoron.uhabits.utils 2021-01-18 16:13:19 +01:00
Quentin Hibon
25b25acc94 Convert org.isoron.uhabits.acceptance 2021-01-18 16:13:19 +01:00
Quentin Hibon
ac6df47818 Convert uhabits-core (jvmTest) 2021-01-18 16:13:19 +01:00
Quentin Hibon
0f828cbd3a Convert uhabits-android (test) 2021-01-18 16:13:19 +01:00
Quentin Hibon
eb8d39fbe3 Convert org.isoron.uhabits.core.ui.widgets 2021-01-18 16:13:19 +01:00
Quentin Hibon
11831a2b24 Convert org.isoron.uhabits.inject 2021-01-18 16:13:19 +01:00
Quentin Hibon
e9816a22a3 Convert SettingsFragment 2021-01-18 16:13:19 +01:00
Quentin Hibon
8165b5417f Convert HabitCardListAdapter 2021-01-18 16:13:19 +01:00
Quentin Hibon
714771fbc3 Convert org.isoron.uhabits.activities.common.dialogs 2021-01-18 16:13:19 +01:00
Quentin Hibon
a2a8dc4489 Mention git pre-commit hook in GUIDELINES.md 2021-01-18 16:13:19 +01:00
Quentin Hibon
bbe39f8523 Replace appendln with appendLine 2021-01-18 16:13:19 +01:00
Quentin Hibon
a69490a23a Update kotlin version 2021-01-18 16:02:48 +01:00
Quentin Hibon
b6223c3805 Fix outdated javadocs 2021-01-18 16:02:48 +01:00
e3524c112a Convert uhabits-android/build.gradle to Kotlin 2021-01-16 15:31:22 -06:00
8c0141508d Convert uhabits-server/build.gradle to Kotlin; use standard paths 2021-01-16 14:44:24 -06:00
8206450456 Convert top-level build.gradle to Kotlin 2021-01-16 13:55:26 -06:00
a5dfe0ec51 Convert uhabits-core/build.gradle to Kotlin 2021-01-16 09:45:23 -06:00
9a4aaf47bc Merge pull request #707 from hiqua/dev 2021-01-14 06:41:37 -06:00
Quentin Hibon
485e4245ff Fix kotlin null check 2021-01-12 18:25:08 +01:00
Quentin Hibon
72a7cd9685 Fix ambiguous @Module 2021-01-12 18:25:00 +01:00
Quentin Hibon
95a7c4f474 Fix gradle task 'ktlintApplyToIdea' 2021-01-12 17:36:11 +01:00
Quentin Hibon
f208601bc4 Convert uhabits.receivers to kotlin 2021-01-12 17:33:53 +01:00
Quentin Hibon
d5b9fda636 Convert SnoozeDelayPickerActivity to kotlin 2021-01-12 17:33:53 +01:00
99277491c8 Remove unused imports 2021-01-05 23:09:34 -06:00
2828dfcc75 Update copyright notices 2021-01-05 23:05:48 -06:00
b14aa668c2 Update BUILD.md 2021-01-05 22:57:11 -06:00
47de6243d3 Update GUIDELINES.md 2021-01-05 22:54:56 -06:00
7bad2c886b Fix GitHub Actions script 2021-01-05 22:31:49 -06:00
c4e496a5ff Update build scripts 2021-01-05 22:18:35 -06:00
7ee3e00e49 Create top-level gradle project; remove duplicated gradle wrappers 2021-01-05 22:03:01 -06:00
2f39b63723 Add ktlint to uhabits-core; clean up build.gradle 2021-01-05 21:24:20 -06:00
d279388884 Merge branch 'dev' into feature/kmm-merge 2021-01-05 20:43:37 -06:00
Marco Zanetti
358e1ccf42 Convert org.isoron.uhabits.core.utils to Kotlin (#699) 2021-01-05 20:33:49 -06:00
236d56bbf0 Remove unused files 2021-01-03 20:47:21 -06:00
68f9b8339f Flatten uhabits-android into a single gradle module 2021-01-03 20:44:55 -06:00
4a4356b72a Update build scripts 2021-01-03 17:35:31 -06:00
b71675585c Update path to uhabits-core-legacy 2021-01-03 14:52:17 -06:00
bebb356425 Reorganize top level directory 2021-01-03 14:43:49 -06:00
9fd36d8d53 Move uhabits-core to top level; all Java files to uhabits-core:jvmMain/jvmTest 2021-01-03 13:21:02 -06:00
1137088e20 Merge branch 'dev' into canvas 2021-01-03 12:02:32 -06:00
6f2b2ab883 Remove Google AutoFactory; expand Dagger imports
Fixes #681
2021-01-03 11:31:55 -06:00
d8fcc9160d Make uhabits-core a Kotlin multiplatform module 2021-01-03 10:21:28 -06:00
cb6843e08b Remove ShowHabitScreen and ShowHabitBehavior 2021-01-02 00:45:16 -06:00
162eac3bdf HistoryChart: Fix HistoryEditorDialog 2021-01-01 23:20:20 -06:00
e2d2b5b4b3 HistoryChart: Customizable first day of week 2021-01-01 17:47:28 -06:00
de3668db96 HistoryChart: Fix transparency 2021-01-01 11:32:38 -06:00
93a2ec3186 Replace HistoryChart by new Kotlin implementation 2021-01-01 09:36:23 -06:00
354c930d85 Replace BarChart by new Kotlin implementation 2020-12-31 15:20:00 -06:00
e97cdce467 Copy platform.{gui,io,time} from core; implement AndroidCanvas 2020-12-31 13:29:43 -06:00
13826f4934 ShowHabitActivity: Move presenters and view models to uhabits-core 2020-12-31 00:10:29 -06:00
1cdbc53dc5 EntryList: simplify groupBy 2020-12-30 22:45:33 -06:00
51b9517897 EntryList: remove getValues 2020-12-30 17:28:10 -06:00
a74a4b390b StreakList: Return copy of list, instead of a view to original list 2020-12-30 16:44:26 -06:00
79b134164a Convert remaining core.io classes to Kotlin 2020-12-30 16:36:27 -06:00
ced78e0b1f Update guidelines on code style 2020-12-30 15:29:26 -06:00
9087025418 Reformat all Kotlin files with ktlint; add check to build script 2020-12-30 15:15:12 -06:00
9a5263e508 Update GUIDELINES.md 2020-12-30 12:26:39 -06:00
75571e2eb0 Fix link 2020-12-30 12:23:21 -06:00
b5ed4b9a9c Merge branch 'dev' of github.com:iSoron/uhabits into dev 2020-12-30 12:19:42 -06:00
2daf08d22d Update developer guidelines 2020-12-30 12:18:19 -06:00
2e51c73ac0 Update README.md 2020-12-30 09:14:11 -06:00
298bb01762 Convert some core.io classes to Kotlin 2020-12-29 22:18:53 -06:00
a02c7bdc44 Convert core.database classes to Kotlin 2020-12-29 21:50:45 -06:00
feb3c98459 Convert HabitMatcher, Reminder and Streak to Kotlin 2020-12-29 20:21:38 -06:00
823d8bed7e Merge branch 'dev' of github.com:iSoron/uhabits into dev 2020-12-29 20:04:05 -06:00
68813580eb Merge branch 'master' into dev 2020-12-29 19:28:56 -06:00
6bc1b91cc6 Update README.md 2020-12-29 19:23:49 -06:00
56f91526e6 Update CHANGELOG 2020-12-29 18:51:12 -06:00
dbc6a16a98 Set forceDarkAllowed to false 2020-12-29 18:43:09 -06:00
4d3c5ad732 Convert HabitNotFoundException to Kotlin 2020-12-29 16:51:26 -06:00
307ff5c1ca Convert Frequency to Kotlin 2020-12-29 16:51:16 -06:00
3b86a17b49 Simplify StreakList 2020-12-29 16:20:45 -06:00
54fe849eef Remove MemoryStreakList.java 2020-12-29 15:04:18 -06:00
c023711d16 Convert ScoreList to Kotlin 2020-12-29 14:17:52 -06:00
9bc0f44777 ScoreList: Remove groupBy functions 2020-12-29 14:10:27 -06:00
4a3a767cb2 ScoreList: Recompute given interval 2020-12-29 13:42:11 -06:00
d0c37fef67 ScoreList: Remove reference to Habit 2020-12-29 13:24:12 -06:00
11863cd7b0 Simplify ScoreList 2020-12-29 12:53:14 -06:00
1c696e2561 Remove MemoryScoreList 2020-12-29 09:08:08 -06:00
43c5e450a8 Convert Score to Kotlin 2020-12-29 09:01:41 -06:00
0a84d8a1d8 ScoreList: Remove ModelObservable 2020-12-29 08:58:11 -06:00
354a4d08be buildEntriesFromInterval: selectively copy over 2020-12-29 08:50:46 -06:00
af93c0e488 BarChart: Update tests and images 2020-12-29 08:22:32 -06:00
b8aa322691 EntryList: Fix tests 2020-12-29 08:19:39 -06:00
a87987da87 Remove target from HistoryChart and BarChart 2020-12-29 08:14:17 -06:00
8b8e9d3980 EntryList: Make groupBy always return thousandths 2020-12-29 08:09:02 -06:00
a19f39308e Fixes to BarCard 2020-12-29 08:00:04 -06:00
0b23fbed86 Fix tests 2020-12-28 23:08:11 -06:00
d1eeb559cb Reorganize theme attributes; minor fixes to dialog style 2020-12-28 22:52:41 -06:00
2e4a82418f Fix usage of singular/plural in alert messages
Closes #405
Closes #131
2020-12-28 22:28:58 -06:00
fcdb400edf Merge branch 'Nirvyz/dev' into dev 2020-12-28 21:40:12 -06:00
Armand Dc
f80fb35e35 Fix color and font inconsistencies 2020-12-28 21:39:36 -06:00
056a7b722b build.sh: Replace wait by repeated checks 2020-12-28 21:17:35 -06:00
f4c0f353f3 Fix large tests for API 28 2020-12-28 21:12:03 -06:00
3fb7fbac51 build.sh: Create fresh AVD for large-tests 2020-12-28 21:11:41 -06:00
bd70746278 Fix UUID generation 2020-12-28 18:51:17 -06:00
c744d945a4 Redirect Help & FAQ to GitHub Discussions 2020-12-28 15:31:29 -06:00
f0696b3f60 Don't run actions when markdown files are changed 2020-12-28 14:50:39 -06:00
bc36f24551 FAQ: Fix typo 2020-12-28 14:47:14 -06:00
82b68b5f4e Update bug_report.md 2020-12-28 10:55:02 -06:00
e8238b5ed7 Enable widget stacks for all users 2020-12-28 10:35:30 -06:00
599f21fabb Delete feature_request.md 2020-12-27 21:18:15 -06:00
e91e2c1c96 Create config.yml 2020-12-27 21:17:48 -06:00
9f421bfd6d Add landing page source code 2020-12-27 19:18:42 -06:00
3a4071505e Update issue templates 2020-12-27 17:43:20 -06:00
344c4a324c Update README.md 2020-12-27 17:41:01 -06:00
0aca118546 Update bug_report.md 2020-12-27 17:25:34 -06:00
124c490f25 Update issue templates 2020-12-27 17:23:08 -06:00
0a5622c78e Simplify all command and convert them to Kotlin 2020-12-26 22:22:04 -06:00
373f21e247 Simplify CommandRunner and convert it to Kotlin 2020-12-26 22:01:23 -06:00
e80292e75d NumberButtonView: Display missing data as question marks 2020-12-26 12:14:18 -06:00
7173381d9b Rename Entries to EntryList 2020-12-26 11:59:27 -06:00
78f31a65d4 Remove EntryList 2020-12-26 11:54:05 -06:00
2e19fee83c Replace invalidateNewerThan by recompute; add newComputedEntries 2020-12-25 13:28:52 -06:00
f6754ff180 Implement Entries.getValues 2020-12-25 13:14:36 -06:00
3f74c77755 Replace RepetitionList by Entries 2020-12-24 20:35:33 -06:00
c904e22c0f Implement SQLiteEntries; rename RepetitionRecord to EntryRecord 2020-12-24 12:51:58 -06:00
27023e50ae HistoryEditorDialog: Listen to commands 2020-12-24 11:15:22 -06:00
0f2f010f94 EditHabitCommand: Notify listeners 2020-12-24 10:49:28 -06:00
cf2989d587 Refactor Habit 2020-12-24 10:41:01 -06:00
94c78ebb72 Write cleaner version of EntryList 2020-12-24 09:43:03 -06:00
d9be39b839 Remove MemoryRepetitionList 2020-12-23 19:56:34 -06:00
7fcad7b5c5 Remove MemoryEntryList 2020-12-23 19:47:41 -06:00
cfeef3651f Remove ModelObservable from EntryList 2020-12-23 19:25:42 -06:00
e849e8a5c2 Remove ModelObservable from RepetitionList 2020-12-23 19:17:54 -06:00
5bd21e68df Rename CheckmarkList to EntryList 2020-12-23 19:12:26 -06:00
71597ca89b Rename Checkmark to Entry 2020-12-23 19:08:31 -06:00
a3cf2877b8 Unify Checkmarks and Repetitions 2020-12-23 18:40:20 -06:00
23e9ccb236 Convert Repetition to Kotlin 2020-12-23 18:09:38 -06:00
7d97554cb1 Convert Checkmark to Kotlin 2020-12-23 17:59:09 -06:00
5f8c0d67b8 Convert AppScope to Kotlin 2020-12-23 17:45:12 -06:00
b468325f64 Replace Config.java by Constants.kt 2020-12-23 17:44:38 -06:00
39d23424d6 Remove CancelableTask 2020-12-23 15:51:45 -06:00
eba2dd0171 Remove HabitsActivity 2020-12-23 15:16:32 -06:00
1bdd44085c Clean up and update dependencies 2020-12-23 14:26:07 -06:00
596af6afe6 Remove android-base; move Dagger classes to uhabits.inject 2020-12-23 13:43:42 -06:00
3f3ddc3955 Remove BaseActivity and BaseScreen 2020-12-23 13:31:13 -06:00
a58c60b8ce Remove BaseRootView 2020-12-23 13:06:29 -06:00
b42ad0dd83 Refactor SettingsActivity; clean up BaseScreen 2020-12-23 12:50:14 -06:00
e0fbe841c1 Remove BaseSelectionMenu 2020-12-23 12:43:59 -06:00
3523b2c1a3 Remove BaseMenu 2020-12-23 12:23:23 -06:00
c15c14ffcd Simplify SyncActivity; make QR code always white 2020-12-23 11:27:59 -06:00
8cd729480f Remove ButterKnife 2020-12-23 11:18:25 -06:00
638bc2816f Refactor AboutActivity 2020-12-23 11:12:32 -06:00
826ea17cdd Refactor EditSettingActivity 2020-12-23 10:53:00 -06:00
19e221bb32 ShowHabitActivity: Re-enable menus and actions 2020-12-23 10:24:20 -06:00
85de69bca7 Remove unused HabitCard 2020-12-23 08:18:46 -06:00
7d5b9d0f63 Refactor BarCard 2020-12-23 08:15:40 -06:00
816ab71d83 Refactor HistoryCard 2020-12-22 20:09:00 -06:00
c230b5c40d Fix score widget name 2020-12-22 19:45:48 -06:00
71620a320d Refactor FrequencyCard 2020-12-22 19:41:38 -06:00
c016b0aecc Refactor ScoreCard 2020-12-22 19:21:05 -06:00
95b3028c95 Refactor StreakCard 2020-12-22 16:32:31 -06:00
ae4ac801a0 Restructure ShowHabitActivity 2020-12-22 16:17:40 -06:00
bda3e42e2b Create view-model and presenter for TargetCard; reduce boilerplate 2020-12-22 12:59:44 -06:00
4dc1df5887 Refactor TargetCard 2020-12-22 12:05:51 -06:00
302b9f5df4 Refactor SubtitleCard 2020-12-22 11:37:06 -06:00
c2d89c7a60 Refactor NotesCard 2020-12-22 10:37:49 -06:00
45574753c7 ShowHabitPresenter: Listen to commands and auto-update 2020-12-22 10:23:07 -06:00
c84c618ef0 Refactor OverviewCard 2020-12-22 10:07:45 -06:00
98d17d60a5 Refactor ShowHabitRootView; convert ShowHabitActivity to Kotlin 2020-12-22 09:17:39 -06:00
4c1c6e76fc Remove unused methods 2020-12-21 21:51:49 -06:00
ac1441aba5 Simplify commands 2020-12-21 21:49:12 -06:00
5d2ff40dc9 Replace primitive int by PaletteColor 2020-12-21 21:36:35 -06:00
63f2b80515 Remove AndroidDateUtils 2020-12-21 20:41:01 -06:00
52b25fbc72 Remove AndroidDateFormats 2020-12-21 20:29:41 -06:00
b94a887534 Remove redundant logError method 2020-12-21 20:25:48 -06:00
f6699fbfda Move SyncManager to uhabits-core 2020-12-21 18:20:43 -06:00
9743b05a78 Move sync package to org.isoron.uhabits.core 2020-12-21 17:13:08 -06:00
9681b7b5ef RemoteSyncServer: Improve logging 2020-12-21 17:08:55 -06:00
017bc50698 Move sync classes to uhabits-core 2020-12-21 17:08:55 -06:00
1e94456a74 Add server metrics 2020-12-21 17:08:55 -06:00
2fcba80f3a Server: Implement temporary links 2020-12-21 17:08:55 -06:00
fc4cbe84f0 Update README.md 2020-12-09 20:39:22 -06:00
011abf62a0 Bump version to 1.8.11 2020-12-09 20:01:35 -06:00
Sunxy88
9c96857262 Use dark theme in settings window. (#655) 2020-12-09 19:57:03 -06:00
4f55ec6ea8 Bump version number 2020-11-29 16:16:27 -06:00
8139088b39 Update README.md 2020-11-29 15:30:37 -06:00
44f7d13449 Include pre-release badge 2020-11-29 15:30:22 -06:00
16b0682229 Ignore all performance tests 2020-11-29 15:05:28 -06:00
a77798f293 PerformanceTest: Increase time limit 2020-11-29 13:38:09 -06:00
08050ff616 WidgetUpdater: Remove rate limit 2020-11-29 13:07:17 -06:00
12b080152b Speed up CreateHabitCommand and CreateRepetitionCommand 2020-11-29 12:46:01 -06:00
df3d660e83 SyncActivity: Remove password field 2020-11-29 07:19:40 -06:00
4908709296 Merge branch 'feature/sync' into dev 2020-11-29 07:12:12 -06:00
5717ae1bf1 RemoteSyncServer: Fix test 2020-11-29 07:11:38 -06:00
872c8d9d81 SyncManager: Small fix in logging 2020-11-29 06:47:18 -06:00
0b6110f0f9 Add alpha to version name 2020-11-28 22:29:24 -06:00
6df5e9ebe9 Monitor network availability; other minor fixes 2020-11-28 22:28:54 -06:00
2b9fd74a1d Close database 2020-11-28 22:28:46 -06:00
4a4b3c6aeb Server: change dir structure 2020-11-28 22:27:55 -06:00
7979f74bea Server: data persistence 2020-11-28 16:23:21 -06:00
b0336fb495 SyncManager: Log sync key 2020-11-28 16:22:33 -06:00
328fcd23f4 SyncManager: Run tasks in the same thread 2020-11-28 11:37:35 -06:00
9c0951ae58 Minor fixes to sync protocol 2020-11-28 11:32:28 -06:00
3f51561271 GitHub Actions: Upload only build outputs 2020-11-28 10:10:01 -06:00
1787c0e74e Upgrade to Android Gradle plugin 4.1.0 2020-11-28 10:06:53 -06:00
49faacda1c Wrap base64 functions; close gzip stream before reading 2020-11-28 09:44:45 -06:00
339eeff1ff Merge branch 'dev' into feature/sync 2020-11-28 08:55:12 -06:00
849212fd2f Run medium tests three times 2020-11-28 08:48:55 -06:00
356b2b06e4 Update README.md 2020-11-27 18:58:02 -06:00
b6eefbdb36 setSystemTime: Try two methods 2020-11-27 18:35:52 -06:00
2a72601153 Increase minSdkVersion to 23 2020-11-27 18:22:44 -06:00
2bf7358207 Fix medium tests for Android APIs 23-25 2020-11-27 18:00:56 -06:00
8c6e2ef461 GitHub Actions: Test multiple Android versions 2020-11-27 17:32:01 -06:00
ce0cbb6ee2 Sync: Improve encryption and preferences API 2020-11-27 10:55:55 -06:00
67ef3bb90c SyncManager: Switch to coroutines 2020-11-27 09:13:17 -06:00
b82af419f8 Merge branch 'dev' into feature/sync 2020-11-26 23:56:53 -06:00
49ff9a7edf Fix failing tests 2020-11-26 23:47:40 -06:00
53ebdf4f14 Skip upload if database has not changed 2020-11-26 23:43:47 -06:00
4762b54701 Merge branch 'dev' into feature/sync 2020-11-26 15:39:44 -06:00
aa288ac406 Make question marks optional
Fixes #96
2020-11-26 15:36:44 -06:00
2228dbf0f4 Create new UNKNOWN checkmark state 2020-11-26 15:08:49 -06:00
9ca1c8e459 Rewrite WidgetBehavior and associated tests 2020-11-26 14:19:15 -06:00
61414d62f4 Remove calls to Repetition.add and Repetition.remove 2020-11-26 14:19:02 -06:00
f97fed3b9b Repetition: Replace toggle by setValue 2020-11-26 13:29:12 -06:00
d45281d137 Merge branch 'master' into dev 2020-11-26 08:59:52 -06:00
1bb6ad41b2 Merge branch 'hotfix/1.8.10' 2020-11-26 08:22:50 -06:00
56c180183e Update release notes 2020-11-26 08:22:37 -06:00
af8d983cca Add dummy settings.gradle file to help F-Droid locate app metadata 2020-11-26 08:20:10 -06:00
0a49232ebd Add dummy settings.gradle file to help F-Droid locate app metadata 2020-11-26 08:11:40 -06:00
cff8e26428 Update translations 2020-11-25 22:33:41 -06:00
e892bccb32 Bump version to 1.8.10 2020-11-25 18:23:27 -06:00
68ccf37fd5 Add UUID to habits 2020-11-24 08:28:16 -06:00
659c528744 SyncManager: First version 2020-11-24 06:55:37 -06:00
b1560dd694 LoopDBImporter: Use commands instead of directly modifying DB 2020-11-24 06:54:28 -06:00
0de86ac66c Update widgets at most once per minute 2020-11-24 06:53:20 -06:00
06e5d517cc Downgrade Ktor 2020-11-24 06:51:34 -06:00
35ca041bc2 EncExt: Trim keys 2020-11-24 06:51:08 -06:00
576a334dc9 Update sync intent-filter 2020-11-24 06:32:21 -06:00
294aee5d12 Implement cryptography extensions 2020-11-22 22:39:22 -06:00
0859cec853 Implement intent filter; hide password for now 2020-11-22 17:00:37 -06:00
23f2978a64 Add sync preferences to settings screen 2020-11-22 15:39:08 -06:00
a2400172e2 Make registration functional 2020-11-22 13:00:59 -06:00
5376f4bff8 Implement SyncActivity (with static data) 2020-11-22 10:07:34 -06:00
0497890cb0 Update docker registry URL 2020-11-22 10:02:53 -06:00
2848c4e77b Server: Implement get version 2020-11-22 09:49:35 -06:00
8fa3ba1b18 Add docker tasks to gradle 2020-11-21 20:49:48 -06:00
b4f36dd258 Initial version of Ktor sync server 2020-11-21 20:12:14 -06:00
008902d3b7 AutoBackup: Use getLocalTime instead of getStartOfToday; improve logging 2020-11-21 10:12:52 -06:00
4764c07f3b Bump version to 2.0.0 2020-11-19 19:29:26 -06:00
8f0cfa8614 Update CHANGELOG.md 2020-11-19 19:27:27 -06:00
865e1969e6 Update CHANGELOG 2020-11-19 19:22:10 -06:00
Quentin Hibon
bfddc42f5e Allow user to sort by status (#660) 2020-11-19 19:05:21 -06:00
dc0b8deccf Export backups daily
Fixes #178
2020-11-19 18:31:28 -06:00
b674d14b49 Opt-in skips: Update tests 2020-11-18 22:26:45 -06:00
d594d3b085 Make skip days an opt-in feature 2020-11-18 22:13:03 -06:00
bef85bf93a CHANGELOG: Minor fixes 2020-11-18 07:16:17 -06:00
76eaefc95b Merge branch 'master' into dev 2020-11-18 07:11:45 -06:00
83c1ab35d5 GH Actions: Update publish.yml 2020-11-18 06:57:22 -06:00
7a6563736a Merge branch 'hotfix/1.8.9' 2020-11-18 06:47:44 -06:00
55c50c1119 Update CHANGELOG 2020-11-18 06:47:29 -06:00
ba08968600 Fix tests 2020-11-18 06:45:47 -06:00
Sunxy88
2d488a67f2 Use dark theme in settings window. (#655) 2020-11-14 07:57:07 -06:00
Kristian Tashkov
d997b1378d Setting custom start of the day (#621) 2020-09-19 19:23:00 -05:00
720f98f9bd Write tests for IntentScheduler 2020-09-19 19:11:57 -05:00
ddea9e78a9 ScoreList: Fix interaction between SKIP and rolling sum 2020-09-16 07:38:59 -05:00
c429cb41c0 Fix method rename 2020-09-15 22:32:46 -05:00
ae286cec14 Take frequency into account when computing score for numerical habits 2020-09-15 22:30:44 -05:00
31d631b155 Update test screenshots 2020-09-15 22:30:44 -05:00
20142d5f94 Reduce time required to form non-daily habits; smooth out irregular schedules 2020-09-15 22:30:44 -05:00
ef186d55c6 Update test screenshots 2020-09-15 22:30:44 -05:00
8b847ae9fa ScoreList: Use rolling sum method also for boolean habits
See #641
2020-09-15 22:30:44 -05:00
Kristian Tashkov
a4ef657897 Make skips freeze score (#630) 2020-09-13 17:01:15 -05:00
f44556e281 ScoreList: Use rolling sum for non-daily numerical habits 2020-09-12 21:40:59 -05:00
8a895b2d20 Fix colors in BarChart and HistoryChard 2020-09-12 16:09:12 -05:00
61f32449dd Numerical habits: allow Tasker to increment/decrement value 2020-09-12 15:10:46 -05:00
Kristian Tashkov
07f8583c3d Don't show reminders from archived habits (#639) 2020-09-12 13:15:23 -05:00
Kristian Tashkov
69f11c9d4e Fix clearing of reminders (#638) 2020-09-12 12:47:03 -05:00
Nguyen Ly Nam
1ffc079042 Numerical habits: update notifications and detail screen (#627) 2020-09-11 17:32:20 -05:00
5fa3f412c0 Show YES_AUTO as grey checkmark
This reverts a change introduced recently where YES_AUTO (previously CHECKED_IMPLICITLY)
was shown as a grey dash.
2020-09-05 18:46:48 -05:00
b72cad5316 Rename checkmark values to NO, YES_AUTO, YES_MANUAL and SKIP
This makes the source code consistent with the user interface.
2020-09-05 18:04:04 -05:00
Kristian Tashkov
d59ab89426 Update widgets at midnight (#634) 2020-09-05 17:25:46 -05:00
ea019321e6 Revert "NumberPickerFactory: Show and hide keyboard using InputMethodManager"
This reverts commit 6967def950. InputMethodManager method
does not work reliably on widgets. It also cannot reliably hide the keyboard.
2020-09-03 22:22:07 -05:00
6967def950 NumberPickerFactory: Show and hide keyboard using InputMethodManager
In about 1 every 10 attempts, the previous solution randomly failed to show
the keyboard, although the text field was focused. This solution seems more reliable.
2020-09-03 21:55:03 -05:00
6d4cac427f NumberPickerFactory: Automatically show keyboard 2020-09-03 21:06:46 -05:00
152b2d5427 Merge pull request #631 from KristianTashkov/habit_selection_dark_theme
Fix habit selection menu item background color
2020-09-02 08:09:26 -05:00
9d28fbe7b5 ScoreList: Revert recent changes to computation of scores 2020-09-02 07:01:54 -05:00
c846dfc75a Make skips equivalent to implicit checks; make their visual representation consistent 2020-09-01 22:23:42 -05:00
ee7eb4ef51 build.sh: Always use GRADLE variable 2020-09-01 22:22:38 -05:00
KristianTashkov
57bfe3d801 Fix habit selection menu item background color 2020-09-01 15:53:30 +03:00
a5ee96f988 HistoryChart: Make skipped days a bit more clear 2020-08-23 15:09:13 -05:00
7b0eddeac5 Set minimum widget size 2020-08-23 14:48:58 -05:00
e8e52db9b1 HabitPickerDialog: Show "no habits found" message 2020-08-23 14:39:11 -05:00
cddbf558e6 Reactivate widget view tests; update widget previews 2020-08-23 14:09:50 -05:00
79459c373e Manage exceptions for when activities don't exist to handle intents
Fixes #181
2020-08-23 08:57:00 -05:00
84523869e8 Manage exceptions for when activities don't exist to handle intents
Fixes #181
2020-08-23 08:43:22 -05:00
590298bf5b MemoryHabitList: Inherit parent's order
Fixes #598
2020-08-23 07:43:20 -05:00
8067fd5313 MemoryHabitList: Inherit parent's order
Fixes #598
2020-08-23 07:41:42 -05:00
Christoph Hennemann
d2dc756a34 Improve readability of history and streak charts
Fixes #432

Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-22 23:37:43 -05:00
2af1dbf3a6 Reactivate HistoryChart tests; fix IndexOutOfBoundsException 2020-08-22 19:42:46 -05:00
ebab6f08ee Remove obsolete regression test 2020-08-22 19:04:29 -05:00
4a2b21855a Update ListHabitsRegressionTest 2020-08-22 19:04:11 -05:00
42d5edec26 WidgetTest: Tap twice to remove checkmark 2020-08-22 18:50:39 -05:00
f368e43158 CreateRepetitionCommand: Run update() after executing 2020-08-22 18:27:12 -05:00
09eb8c9f4d Fix widget tests on API 29+ 2020-08-22 17:52:53 -05:00
209e709163 Make widgets fully opaque by default 2020-08-22 16:26:59 -05:00
d20a2be7e6 Remove obsolete test screenshots 2020-08-22 15:58:26 -05:00
bd68f8fc5a Revert changes to HistoryCard view screenshots 2020-08-22 15:56:24 -05:00
KristianTashkov
1a05f7d85d Allow user to skip days without breaking streak
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-22 15:35:35 -05:00
TacoTheDank
d9ff429c28 Deprecation fixes
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-22 12:14:35 -05:00
3554895a5d Widgets: Show shadow if widget is completely opaque 2020-08-18 08:09:12 -05:00
16491c142a Widgets: Fix title size 2020-08-18 08:00:38 -05:00
859fea5ff5 Hide streaks for numerical habits 2020-08-18 07:57:57 -05:00
34c73e89db Merge branch 'hotfix/1.8.9' into dev 2020-08-15 15:18:21 -05:00
09bf49a9ce Remove notification groups; revert to default system behavior 2020-08-15 14:45:40 -05:00
48e43869c7 Merge branch 'hotfix/1.8.9' into dev 2020-08-15 14:18:50 -05:00
963fb58309 Revert changes to android-pickers 2020-08-15 13:58:03 -05:00
38fb37cde2 Remove SyncManager and Internet permission 2020-08-15 13:54:29 -05:00
d0b4e3e163 Bump version to 1.8.9 2020-08-15 13:35:48 -05:00
3ef3be4d16 Tidy up strings.xml 2020-08-15 12:47:32 -05:00
bae0e3bcc1 Remove unused resources 2020-08-15 12:45:34 -05:00
3e99d821a5 Allow user to sort habits in reverse order
Closes #556, closes #497
2020-08-15 12:29:49 -05:00
olegivo
acb5051eec Konvert BaseActivity
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-15 11:46:13 -05:00
olegivo
b76882dd1d Konvert BaseMenu
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-15 11:41:19 -05:00
olegivo
978946baab Konvert BaseSelectionMenu
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-15 11:38:41 -05:00
olegivo
d202f14c14 Konvert BaseScreen
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-15 11:36:03 -05:00
olegivo
17a85e517a Konvert BaseRootView
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-13 07:53:37 -05:00
olegivo
c5bc5deff0 Konvert ActivityScope
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-13 07:44:07 -05:00
olegivo
b7f04957a5 Konvert ActivityContext
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-13 07:43:19 -05:00
olegivo
b0f5f96eee Konvert StyledResources
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-13 07:40:49 -05:00
olegivo
fd76a3c6fd Konvert InterfaceUtils
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-13 07:32:41 -05:00
b31482881b Merge pull request #608 from KristianTashkov/kris/fix_yes_no
Only save numerical habit features if the habit is numerical
2020-08-04 07:29:50 -05:00
KristianTashkov
87231d7fa4 fix saving of non-numerical habits 2020-07-20 13:12:58 +03:00
olegivo
4d18a1335c Convert FileUtils to Kotlin
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-07-12 10:22:18 -05:00
olegivo
424a417a13 Convert ColorUtils to Kotlin
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-07-12 10:00:23 -05:00
Thomas S
96d23bdf22 Update checkmark widget for numerical support
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-07-12 09:25:49 -05:00
a8e77b8df8 Update test screenshots 2020-07-02 08:04:03 -05:00
5413569ce3 Update test screenshots 2020-07-02 07:31:02 -05:00
d80b85ac8c Make bars round 2020-06-25 07:16:47 -05:00
40bc35935f Create target widget 2020-06-25 07:04:43 -05:00
a6060f468d Create new TargetCard and TargetChart 2020-06-25 06:12:26 -05:00
6ec9d51a1e CheckmarkList: Implement getThisIntervalValue 2020-06-24 20:07:56 -05:00
de28a5e74e EditHabitActivity: Do not divide target by freq denominator 2020-06-24 20:07:21 -05:00
3ba503604b Show target in SubtitleCard; replace some bitmap icons by FontAwesome 2020-06-23 06:19:08 -05:00
6d48b53861 Merge branch 'master' into dev 2020-06-21 17:28:41 -05:00
0cce6b30b1 Merge branch 'hotfix/1.8.8' 2020-06-21 11:39:25 -05:00
bf650a7565 Fix crash when saving habit (some languages only) 2020-06-21 11:31:53 -05:00
b78cd1dd0d Update tests 2020-06-21 11:00:00 -05:00
6d9ad8c56c Tweak snapIntervalsTogether so that "1 time every x days" habits work better 2020-06-21 10:59:31 -05:00
e7a3f0cffa Fix build script; remove some obsolete tests 2020-06-21 10:45:46 -05:00
6aa72caf6c Bump version to 1.8.8 2020-06-21 10:39:27 -05:00
0b7697d172 Make save button functional for numerical habits 2020-06-20 08:39:55 -05:00
b9850fa085 Create form for numerical habits 2020-06-20 07:45:38 -05:00
ecb3978bdd Fix dialog animations 2020-06-19 20:57:35 -05:00
fc57a9db6c Merge branch 'feature/numerical' into dev 2020-06-19 07:50:50 -05:00
6c9c2a6c1a Update tests 2020-06-19 07:48:40 -05:00
3e0529d515 Remove old EditHabitDialog 2020-06-19 06:59:16 -05:00
7d8d89fbbd EditHabitActivity: Adjust inputType 2020-06-19 06:58:36 -05:00
c43f3c2fd7 EditHabitActivity: Dismiss all fragments on device rotation 2020-06-19 06:39:21 -05:00
403ed8b250 EditHabitActivity: Make save button functional 2020-06-19 06:24:51 -05:00
9ccb2b2737 Implement reminder day picker 2020-06-18 22:19:59 -05:00
424a282847 Update gitignore 2020-06-18 07:45:19 -05:00
309b6cbcaf Implement reminder time picker; customize picker color 2020-06-18 07:43:58 -05:00
72ad14119a Create HabitTypeDialog 2020-06-17 07:00:25 -05:00
Alex Johnson
652ed50d09 Reset habit strength graph scroll location when switching scale
- Create ScrollableChart.reset() to set x coordinate of scroller
- Call reset() from doInBackground() in ScoreCard to reset scroll location
2020-06-16 20:49:14 -07:00
6070a7af2e Merge branch 'dev' into edit-redesign 2020-06-16 07:19:57 -05:00
8fd8c2802b Remove AboutBehavior and AboutModule 2020-06-16 06:44:28 -05:00
923b923745 build.sh: Remove .gradle directory when cleaning project 2020-06-16 06:43:38 -05:00
59c8031372 Minor style changes 2020-06-15 08:27:48 -05:00
0058089e7d Remove redundant repositories section 2020-06-15 08:27:31 -05:00
d5a840388c Merge branch 'dev' into 2kotlin-androidbase 2020-06-15 08:00:34 -05:00
4b07d7d5b1 Fix build script; remove some obsolete tests 2020-06-15 07:59:35 -05:00
2fffc25128 Merge pull request #585 from olegivo/update-agp 2020-06-15 06:19:27 -05:00
4a4501276c Merge pull request #590 from Gelma/typos
Fix typos
2020-06-15 06:16:54 -05:00
Andrea Gelmini
c8e3735dd6 Fix typos 2020-06-13 18:25:05 +02:00
olegivo
61267e40e7 konvert SSLContextProvider 2020-06-04 11:56:03 +03:00
olegivo
c0b664e1e4 konvert BaseExceptionHandler 2020-06-04 11:56:03 +03:00
olegivo
e57c319658 konvert @AppContext 2020-06-04 11:56:03 +03:00
olegivo
e54ba826b3 konvert AndroidDirFinder
remove if-null condition cause ContextCompat.getExternalFilesDirs is @NonNull
2020-06-04 11:56:03 +03:00
olegivo
9b8784b4c4 AndroidBugReporter: more idiomatic kotlin 2020-06-04 11:56:03 +03:00
olegivo
51a7b7a7d4 konvert AndroidBugReporter 2020-06-04 11:56:03 +03:00
olegivo
d761b474cf add kotlin support for android-base project 2020-06-04 11:56:03 +03:00
olegivo
51be585b9d update AGP (4.0.0) 2020-06-04 11:14:52 +03:00
olegivo
76be5037fd update AGP (3.6.3) 2020-05-18 17:37:39 +03:00
aee0da2c64 Merge branch 'feature/kn-update' into dev 2020-05-17 14:54:36 -05:00
f1610e6603 core: Skip BaseViewTests on iOS 2020-05-17 14:54:02 -05:00
a7a1766809 core: update gradle, rename iOS framework 2020-05-17 14:44:00 -05:00
5f83314d56 Fix format method on JVM and JS 2020-05-17 13:33:22 -05:00
c784f40c55 Remove custom iosTest task; fix IosDatabase 2020-05-17 13:28:52 -05:00
6a172d135b Update to K/N 1.3.72; remove i18n classes; rewrite sprintf 2020-05-17 11:47:13 -05:00
13f4981066 Merge pull request #547 from recheej/rechee/add_notes
Add Notes to Habits.
2020-03-01 15:11:38 -05:00
Rechee Jozil
849b91dde2 delete bad unit test 2020-02-01 11:08:32 -08:00
Rechee Jozil
66b4c48d92 null check description 2020-02-01 11:08:06 -08:00
Rechee Jozil
2e64da4cac using wildcard imports 2020-02-01 11:03:14 -08:00
323ddcc11a Implement FrequencyPickerDialog 2020-01-20 06:08:29 -06:00
175000efd1 Follow current theme; implement color switching 2020-01-12 11:54:15 -06:00
6f94fc48c1 First version of EditHabitActivity 2020-01-12 10:20:36 -06:00
Rechee
18d1d0d9f7 fixed screenshot tests 2020-01-09 19:49:14 -08:00
Rechee
47edea47ae creating UI test for blank description 2020-01-08 20:35:45 -08:00
Rechee
1714cf8050 added create habit test for description 2020-01-08 20:16:43 -08:00
Rechee
7366e9a47f add blank habit test 2020-01-08 20:04:11 -08:00
Rechee
e58589cfbd adding description to test 2020-01-08 20:02:38 -08:00
Rechee
2999e0e5eb updating test 2020-01-08 19:50:17 -08:00
Rechee
fa7bc27124 add test for notes Card 2020-01-08 19:36:54 -08:00
Rechee
f5be9d3c67 introduced notes card to support refresh 2020-01-08 19:25:23 -08:00
Rechee
2c46e8909a now showing notes in show habits 2020-01-08 18:57:47 -08:00
Rechee
8b042f30dc displaying subtitle card UI in designer
squash! displaying subtitle card UI in designer
2020-01-08 18:39:30 -08:00
Rechee
46761926d2 now writing question and description to csv 2020-01-08 17:59:26 -08:00
Rechee
88d6a8e513 fix habit importers to use description instead 2020-01-08 17:52:52 -08:00
Rechee
557ae19297 setting description to be blank instead of null 2020-01-08 17:45:55 -08:00
Rechee
9c10a56dda setting question label in subtitle 2020-01-07 22:25:14 -08:00
Rechee
895b068321 fixing tests 2020-01-07 21:32:18 -08:00
Rechee
fb98c5fe9a replacing getDescription with getQuestion all over the code 2020-01-07 20:39:23 -08:00
Rechee
0ec604f21e fix formatting 2020-01-07 20:34:18 -08:00
Rechee
bcd9dd1bb5 now allowing blank for description
squash! now allowing blank for description
2020-01-07 20:33:39 -08:00
Rechee
61bcd253f8 fully implementing question & description in UI and code 2020-01-07 20:22:35 -08:00
Rechee
fb40dbdabc edit name description panel xml 2020-01-07 20:02:55 -08:00
Rechee
0990192cd6 making nullable 2020-01-06 17:46:48 -08:00
Rechee
1cf2d69534 creating migration tests 2020-01-06 17:40:11 -08:00
a3344358b9 Shorten release notes 2020-01-06 18:43:27 -06:00
22fcecb48c Merge branch 'dev' 2020-01-06 18:27:24 -06:00
58d8c799ce Bump version to 1.8.7 2020-01-06 18:25:37 -06:00
f9437d61b0 Fix issue causing multiple notifications to be dismissed at once (#540) 2020-01-06 18:24:53 -06:00
Rechee
0489dc39e0 updating db version and adding migration for question column 2020-01-06 12:46:05 -08:00
Rechee
88b9645be1 adding question to habit and habit record 2020-01-06 12:36:25 -08:00
997ebfc28a ListHabitsRegressionTest: update imports 2020-01-05 19:01:28 -06:00
6a91300d82 Migrate to AndroidX (#544) 2020-01-05 18:47:01 -06:00
889ce9faef Merge branch 'dev' 2020-01-05 08:30:21 -06:00
b3a40efe46 Bump version to 1.8.6 2020-01-05 08:29:56 -06:00
547c7ffdf7 Fix ID assignment on SQLiteHabitList 2020-01-05 08:29:49 -06:00
olegivo
82486c7514 migrate InstrumentationRegistry 2020-01-05 12:24:36 +03:00
olegivo
fe732ea385 manual migration 2020-01-05 12:24:36 +03:00
olegivo
85ec0faa99 update butterknife (10.2.1) for support jetifier 2020-01-05 12:24:27 +03:00
olegivo
9ac1ae9915 automatic migration 2020-01-05 11:22:58 +03:00
895d66b663 Merge branch 'dev' 2020-01-04 09:01:36 -06:00
0f2a93cd27 Bump version to 1.8.5 (48) 2020-01-04 08:58:09 -06:00
323c98edb8 Fix ReminderSchedulerTest 2020-01-04 08:44:42 -06:00
aadfac68cd Bring back snooze button 2020-01-03 19:56:19 -06:00
7076cffec5 Disable more flaky tests 2020-01-03 18:13:01 -06:00
0ef5a8dead Merge branch 'dev' 2020-01-03 17:55:47 -06:00
526c8fe750 Bump version to 1.8.4 (47) 2020-01-03 17:55:20 -06:00
464eaf613d Fix some empty CSV files 2020-01-03 17:46:46 -06:00
b21d77514a Increase logging for ReminderReceiver and WidgetReceiver 2020-01-03 17:46:46 -06:00
58ed759224 Disable notification bundling; add default question 2020-01-03 17:46:42 -06:00
7c742e1016 Make HabitCardListCache more thread-safe; add null checks 2020-01-03 17:09:39 -06:00
2e9330b5c5 Merge branch 'dev' 2020-01-03 13:27:02 -06:00
d1b83d069d Loop 1.8.3 2020-01-03 13:20:09 -06:00
7d35a85a37 Disable some flaky tests 2020-01-03 13:19:34 -06:00
616d9ab46c Put SavedState tests together 2020-01-03 12:59:59 -06:00
b9c9d6852a Merge branch 'edi_habit_crash' into dev 2020-01-03 09:00:35 -06:00
29e4a8d4ec Minor style changes 2020-01-03 09:00:17 -06:00
Rechee
ceed784acd remove unused tag 2020-01-03 08:56:50 -06:00
Rechee
897887f802 optimize imports 2020-01-03 08:56:50 -06:00
Rechee
dcd0c61b8d fixed issue where weekly picker dialog isn't being restored on rotation
squash! fixed issue where weekly picker dialog isn't being restored on rotation
2020-01-03 08:56:50 -06:00
1285b653ed Fix imports 2020-01-03 08:56:40 -06:00
dfd5c65595 Create failing regression test for issue #534 2020-01-03 08:15:52 -06:00
315bddea96 Automatically fix invalid timestamps, instead of crashing 2020-01-03 06:40:30 -06:00
938739d535 Update app description 2020-01-02 17:47:06 -06:00
27f625873d Reorganize .secret 2020-01-02 15:59:59 -06:00
f37d25e86b Loop 1.8.2 2020-01-02 12:58:26 -06:00
b2df70c059 Add Google Play Publisher plugin and Play Store assets 2020-01-02 12:55:44 -06:00
3afd46c59c Remove unused HabitLogger class 2020-01-02 05:41:03 -06:00
e36c649333 Fix unit tests 2020-01-02 05:31:51 -06:00
b2e7c9fe6e Remove HabitNotFound exception from WidgetPreferences 2020-01-02 05:27:17 -06:00
2171d582dc Fix some issues with reminders and print more logs 2020-01-02 05:12:44 -06:00
b7be459537 Create main GitHub Actions workflow 2020-01-01 20:54:51 -06:00
TacoTheDank
cbee09c38f Update gradle scripts and dependencies (#538)
* Update gradle wrapper
* Clean up some unnecessary/unused things in android gradles
* Update some dependencies
2020-01-01 18:03:53 -06:00
6f24e42d1f Disable write-ahead log on SQLite
Android 9 (Pie) silently introduced a new behavior where new SQLite
databases have Write-Ahead Logs (WALs) enabled by default. The data,
even after committed, is not written to the main database file until
later. This caused a silent bug leading to data loss, where exported
backups would either be empty or miss some recent data.
2020-01-01 09:40:35 -06:00
93bb105dac Remove gradle git plugin 2020-01-01 08:45:05 -06:00
f67b74d57d Update CHANGELOG 2020-01-01 08:31:16 -06:00
abbf1e4d66 Update translations 2020-01-01 08:29:44 -06:00
e3f6353062 Preserve widgets from Loop 1.7.11 and lower versions 2020-01-01 08:11:37 -06:00
38d5b2bf16 build.sh: Rename env variables; copy final APK to build/ 2020-01-01 07:46:29 -06:00
7801c933f0 Allow user to change first day of the week
Closes #421
2019-12-31 14:12:17 -06:00
5cdb9eb9d5 Settings: Remove extra margin 2019-12-31 11:23:02 -06:00
dee4670f65 Update CHANGELOG 2019-12-31 11:11:06 -06:00
50a6d7190b Revert change to launcher name 2019-12-30 17:29:24 -06:00
d3371badf8 Make the short name of the app untranslatable 2019-12-30 17:07:59 -06:00
ed1f3e5cdb Update translations 2019-12-30 17:05:46 -06:00
5947926cd5 Rename launcher icon to "Loop" 2019-12-30 16:39:47 -06:00
61cd77e5df Update screenshots 2019-12-30 16:17:17 -06:00
d6ec33d6d3 Fix failing unit test 2019-12-30 16:03:56 -06:00
3f002efb53 Allow user to change transparency of widgets
Closes #376
2019-12-30 16:03:56 -06:00
5191290188 Fix EditHabitDialog theme 2019-12-30 16:03:56 -06:00
cc05543692 Improve performance of detail page by cancelling useless async tasks 2019-12-30 16:03:56 -06:00
Brian Norman
e94e0c057e Capitalize sentences on dialogFormInputMultiline (#535) 2019-12-30 02:46:30 -06:00
350f002ed3 Update translations and credits 2019-12-29 16:15:37 -06:00
04cf4e7785 Update CHANGELOG 2019-12-29 14:31:54 -06:00
bf644f4e09 Rename night mode to dark theme; abide by system-wide settings (API 29)
Closes issue #513
2019-12-29 12:22:19 -06:00
3658aef2e2 Use dark navigation bar in dark theme 2019-12-29 11:42:10 -06:00
190a1171c4 Bump minSdkVersion to 21 (Lollipop) 2019-12-29 11:29:24 -06:00
2b20b6bb9d Add link to privacy policy 2019-12-29 11:12:29 -06:00
caed1aef79 Hide widget stacks feature for non-developers 2019-12-29 08:24:07 -06:00
8341956a90 Hide numerical habits feature for non-developers 2019-12-29 08:24:07 -06:00
de44b48dba Make all tests pass on Android 9.0 (Pie) 2019-12-29 08:24:07 -06:00
7eafd92b2d Make all tests pass on Android 7.1.1 (Nougat) 2019-12-29 08:24:07 -06:00
47dc26fea0 Fix typo in TEST.md 2019-11-17 19:32:04 -06:00
a6dd0939b2 Add TEST.md 2019-11-17 19:12:14 -06:00
898a33a754 Make all tests pass on Android 6.0 (Marshmallow) 2019-11-17 18:23:07 -06:00
1997d9491b Make all tests run successfully on Lollipop 2019-11-17 17:46:36 -06:00
6d57ea0368 Merge branch 'master' into dev 2019-11-16 23:00:26 -06:00
83c1197dc1 Increase target SDK to 29; update support library 2019-11-16 22:31:19 -06:00
48d145626f Update to Build Tools 3.5.2 2019-11-16 22:18:14 -06:00
a57f310c76 Remove DexCount plugin 2019-11-16 22:14:07 -06:00
1e6cb2e841 Remove PlayPublisher plugin 2019-11-16 22:06:19 -06:00
c676a02ca8 Remove Jacoco 2019-11-16 22:04:11 -06:00
ded57cd04a Merge branch 'dev' into agp-update 2019-11-16 22:00:13 -06:00
b8f9e2f309 Update to Dagger 2.25.2 2019-11-16 21:56:49 -06:00
olegivo
2fb9168686 Convert IntroActivity to Kotlin (#520) 2019-11-16 21:16:20 -06:00
9199a64d73 Pick specific Jacoco version (0.8.4) 2019-11-16 21:15:00 -06:00
Mick Dekkers
a69fb369df Preserve selections when reopening EditSettingActivity (#524) 2019-11-10 08:41:10 -06:00
0790961bb5 BUILD.md: add Android Studio instructions 2019-11-10 08:03:57 -06:00
c88fa4a003 First version of BUILD.md 2019-11-09 20:44:56 -06:00
f403dfd7d1 Disable failing tests 2019-11-09 18:37:21 -06:00
105baf629a Flip bar chart 2019-11-08 21:40:49 -06:00
oleg.industry
af37036ac5 jacoco concrete version fixed 2019-10-28 11:45:08 +03:00
oleg.industry
8717ad6ad0 kotlin update (1.3.50) 2019-10-28 11:45:08 +03:00
olegivo
95af0217ff google repository simplification 2019-10-08 14:25:18 +03:00
olegivo
fe091fa740 update AGP (3.5.1)
using default build tools version (from AGP)
2019-10-08 14:25:13 +03:00
olegivo
00abb4486d update libraries
auto-factory (1.0-beta6)
butterknife (9.0.0)
guava (24.1-android)
2019-10-08 14:24:21 +03:00
olegivo
dadfcb7c16 extracted AUTO_FACTORY_VERSION 2019-10-08 14:24:21 +03:00
Veyndan Stuart
77a9701805 Convert PaletteUtils to Kotlin (#510)
* Convert PaletteUtils to Kotlin
2019-10-05 07:31:32 -04:00
bfea4b024a core: Implement bar chart 2019-08-18 07:47:46 -05:00
Tthecreator
3e2cf48223 Changed habit type selection to dropdown instead of popup message (#498) 2019-08-12 12:39:44 -05:00
ec2fa16fab Web: update npm modules 2019-08-12 06:27:20 -05:00
8d97a8d140 Re-enable view tests 2019-08-12 06:10:56 -05:00
563aa8b7b4 Finish Kotlin implementation of IosCanvas 2019-08-12 06:01:32 -05:00
74475bd191 Partial implementation of IosCanvas in Kotlin 2019-08-11 17:11:29 -05:00
957a5b7c17 Fix CSV export in some locales; bump version to 1.7.11 (38) 2019-08-10 11:42:25 -05:00
64cc9f78a8 Increase targetSdk to 28 2019-06-15 09:46:06 -05:00
e50c411d1e Fix crash preventing some Xiaomi devices from showing notifications 2019-06-15 08:57:11 -05:00
046a7eab7f Move IosDatabase to Kotlin 2019-06-09 13:16:29 -05:00
d96732b588 Update 2019-06-07 07:11:47 -05:00
a3bfc05068 Move view tests to common 2019-04-14 10:33:36 -05:00
defa2f9431 Reorganize source tree 2019-04-13 22:54:26 -05:00
fe4139e268 Move tests to commonTest; convert some classes from Swift to Kotlin 2019-04-13 22:28:05 -05:00
d463bb55d7 Unify async tests 2019-04-13 19:27:51 -05:00
5ea19c9475 Restore Backend class; replace TaskRunner by Kotlin Coroutines 2019-04-13 09:20:37 -05:00
b0cedde0a9 Partial kotlin implementation of IosCanvas 2019-04-12 05:17:31 -05:00
e0894c9313 Move IosFiles implementation to Kotlin; setup tests for ios target 2019-04-12 05:16:31 -05:00
8378d88186 Update gradle 2019-04-11 08:13:19 -05:00
ddd363917c Implement JsFileStorage using IndexedDB 2019-04-10 20:07:15 -05:00
f310eaf7d9 Make I/O asynchronous with coroutines; make all JS tests pass 2019-04-10 08:20:13 -05:00
8972f2d03d Move most tests to commonTest 2019-04-10 05:35:56 -05:00
e88c58916a Implement JsFiles 2019-04-10 04:52:17 -05:00
7d169d8053 Update copyright date 2019-04-09 08:46:25 -05:00
c018d89ca6 Implement JsDatabase using sql.js 2019-04-09 08:43:23 -05:00
5c402b5400 Implement HtmlCanvas; move some tests to commonTest 2019-04-09 06:39:38 -05:00
7ba7edb7d4 Set up javascript tests 2019-04-07 16:51:28 -05:00
fe219b5296 Update kotlin gradle plugin; add js target 2019-04-07 13:07:50 -05:00
1abc041d87 Fix ios tests; remove empty test 2019-04-07 09:56:34 -05:00
c16a0ecd65 Migrate Scores to pure Kotlin; display correct score on main screen 2019-04-06 18:53:22 -05:00
6d527a31d7 Add app icon 2019-04-03 06:56:42 -05:00
4d0d631d8a Set minimum number of buttons 2019-04-03 06:56:28 -05:00
5b2b554a7a Dynamically select number of columns to display 2019-04-03 05:50:42 -05:00
33bae657a3 Show numerical habits 2019-04-02 20:16:00 -05:00
082c575f82 Allow user to show/hide archived and completed habits 2019-04-02 07:46:41 -05:00
90f553b4f6 Add Preferences table and repository 2019-04-02 05:57:11 -05:00
6af576c09c Change language automatically 2019-04-01 20:53:00 -05:00
c380abad5a Remove outdated tests 2019-04-01 07:35:18 -05:00
905099ccdb Fix invalid translation files 2019-04-01 07:32:34 -05:00
76b848752c Convert i18n strings from Android XML to Kotlin 2019-04-01 07:22:48 -05:00
48c3ff584a Rename to DetailScreenController; pass habit as argument 2019-03-31 19:43:20 -05:00
979affef22 Replace action sheet icon 2019-03-31 19:08:07 -05:00
274d3d6858 Main screen: add action sheet 2019-03-31 18:08:42 -05:00
f491acdda9 Simplify data trasfer in MainScreenDataSource 2019-03-31 17:31:40 -05:00
6ac7ef7807 Add stubs for Score and Streak 2019-03-31 17:15:39 -05:00
5d1f5168ad Create Observable class 2019-03-31 16:54:43 -05:00
262b9460bd Move README and related files to root 2019-03-31 06:48:30 -05:00
f4e4da6dc5 iOS: use actual data for checkmarks on main screen 2019-03-31 06:48:29 -05:00
024c99e60d Remove Xcode files 2019-03-31 06:48:29 -05:00
aa6b13f3a6 Remove DateCalculator 2019-03-31 06:48:29 -05:00
70a79856f2 Reorganize packages; implement checkmarks 2019-03-31 06:48:29 -05:00
6a30bb98c6 Rename legacy to android 2019-03-31 06:48:29 -05:00
07cf74d400 Remove obsolete react-native version of Android app 2019-03-31 06:48:26 -05:00
94b35545b7 Remove obsolete information from README.md 2019-03-31 06:48:26 -05:00
8544c5dc8a Remove react-native; rewrite main screen in (native) swift 2019-03-31 06:48:26 -05:00
a546f6de73 Update 2019-03-31 06:48:26 -05:00
7cab0a39e5 Implement database access (with migrations) 2019-03-31 06:48:26 -05:00
e19339d808 Add symlink to node_modules 2019-03-31 06:48:26 -05:00
134975b8ba Fix instructions in core/build.gradle 2019-03-31 06:48:26 -05:00
2d0a57efbd Update README 2019-03-31 06:48:26 -05:00
50e94c4d09 Update README; add screenshot 2019-03-31 06:48:26 -05:00
15974bdca8 Add README 2019-03-31 06:48:26 -05:00
0734e74154 Add gradle wrappers 2019-03-31 06:48:26 -05:00
f108bc8dc1 Initial prototype of multi-platform version 2019-03-31 06:48:26 -05:00
4ccda9d6f7 Move existing source code to subfolder 2019-03-31 06:48:26 -05:00
db1ba822fe Merge pull request #472 from chennemann/feat/create-habit-with-long-description
fix: habits with long description could not be saved
2019-01-27 22:30:14 -06:00
bd18a4320a Merge pull request #471 from chennemann/feat/always-hide-archive-action
Always hide archive/unarchive icon
2019-01-27 22:19:43 -06:00
Christoph Hennemann
b180f11834 fix: habits with long description could not be saved
- That was due to a bug where the dialog was not resized
    or scrollable and therefore the save button was not
    accessible

References: #462
2019-01-23 21:16:26 +01:00
Christoph Hennemann
d4b5c7b9d5 feat: Always hide archive/unarchive icon
- Improves usability since the icons do not
    jump around when more than one habit is
    selected

References: #465
2019-01-23 20:55:38 +01:00
a719f6ad98 Merge pull request #459 from chennemann/feat/scroll-bar-in-main-menu
Add scrollbars to habit overview list
2019-01-22 16:49:37 -06:00
Christoph Hennemann
d8894753e0 feat: Add scrollbars to habit overview list
References: #365
2019-01-20 00:40:35 +01:00
178061475e Improve performance when importing database 2018-12-08 12:24:44 -06:00
3581173193 NumberPicker: automatically show keyboard 2018-12-08 08:30:23 -06:00
a839631aae Fix previews in Layout Editor 2018-12-07 05:59:54 -06:00
a3e0d7ffb1 BarCard: fix target 2018-12-06 20:16:45 -06:00
6d4dbcdee7 Disable more flaky tests 2018-12-05 22:08:02 -06:00
33ae289ff1 Temporarily disable flaky tests 2018-12-05 21:52:44 -06:00
fca695ee6b Remove nightly APK badge 2018-12-05 21:27:29 -06:00
8fd175685d Update badge.py to Python 3 2018-12-05 21:02:23 -06:00
6a3e430a5e Merge pull request #438 from vyu1/dev
Add name (Victor Yu) to developer list
2018-09-18 19:04:27 -05:00
Victor Yu
07efa8b321 Add name (Victor Yu) to developer list 2018-09-17 23:31:50 -04:00
9183cb9f37 Update test images 2018-08-14 07:32:02 -05:00
a1bd4836dd gradle: do not abort on lint errors 2018-08-14 07:31:18 -05:00
dc74c0e54b Simplify StackWidgetService; reduce flicker 2018-06-16 19:35:28 -05:00
436d19dfea Merge branch 'dev' into feature/stackview
# Conflicts:
#	uhabits-android/src/main/java/org/isoron/uhabits/widgets/HabitPickerDialog.kt
2018-06-16 18:06:23 -05:00
6ca4877f1f BarChart: allow user to pick interval 2018-06-15 21:11:47 -05:00
6ad302b697 Show bar chart with monthly totals 2018-06-14 22:59:31 -05:00
b0820095f1 Add action for randomizing habit history (dev mode) 2018-06-13 21:39:06 -05:00
b5fda334d4 build.gradle: Give higher priority to Google Maven repository 2018-06-07 22:57:16 -05:00
88beb7b883 build.gradle: Give higher priority to Google Maven repository 2018-06-07 22:54:07 -05:00
49689317b7 Fix adaptive icons; remove obsolete folder 2018-06-07 22:35:20 -05:00
052d26c708 Upgrade to Kotlin 1.2.41 2018-06-07 22:23:40 -05:00
76c88848b2 Upgrade to Gradle 4.4 2018-06-07 22:03:13 -05:00
87f069f986 Merge branch 'master' into dev 2018-06-04 19:57:02 -05:00
ce27773138 Merge branch 'hotfix/1.7.9' 2018-04-21 10:31:54 -05:00
0864f83307 Update CHANGELOG 2018-04-21 10:17:38 -05:00
624cc67d9b Update translations 2018-04-21 10:17:31 -05:00
462bac8167 Add support for adaptive icons
Closes #395
2018-04-21 09:39:30 -05:00
5865eb41f7 Update notification for Android Oreo
- Add link to notification channel settings
- Remove snooze button

Closes #400
2018-04-21 08:50:53 -05:00
2bfd4a942d Remove unused PebbleReceiverTest 2018-04-21 08:00:00 -05:00
b4a33cba39 Add ActiveAndroid source code to our tree and remove content providers
ActiveAndroid is not actively maintained anymore and contains code
related to that Content Providers that makes the application crash on
Android Oreo.
2018-04-14 10:22:31 -05:00
f02c86e61b Bump targetSdkVersion to 27 2018-04-14 10:19:34 -05:00
5021f50e18 Bump version to 1.7.9 (36) 2018-04-14 08:11:22 -05:00
2654521647 Update only widgets containing the habit that was modified 2018-02-04 10:14:24 -06:00
778a7eb6bc Make widgets dark grey instead of black 2018-02-04 10:13:47 -06:00
71d559d6d9 Merge branch 'dev' into feature/stackview 2018-02-04 09:52:16 -06:00
b94d2f2fa6 StackWidget: allow user to select habits 2018-01-27 20:34:11 -06:00
2904f3e2f8 Move some methods to StringUtils 2018-01-27 20:25:55 -06:00
1ad06bcc15 Preferences: allow storing Long arrays 2018-01-27 19:07:05 -06:00
bf8c14fc03 Fix reminder tests 2017-12-06 22:23:28 -06:00
b46b7aae25 Merge branch 'feature/custom-snooze' into dev 2017-12-06 21:42:04 -06:00
357f51fd5e SnoozeDelayPickerActivity: Fix timepicker layout 2017-12-06 21:41:42 -06:00
7f257e045b MemoryHabitList: iterate over a copy of the list 2017-12-04 23:13:31 -06:00
0dc46d02a4 Minor style changes 2017-11-15 21:54:30 -06:00
ecf3086aef Merge branch 'add-delete-button-to-stats' of git://github.com/derebaba/uhabits into pull/delete-button 2017-11-15 21:42:30 -06:00
derebaba
10be875b48 Fixed test 2017-11-15 10:57:00 +03:00
0077d35ff9 Automatically dismiss summary notification 2017-11-14 23:03:46 -06:00
2a4a7c975f Add action to show reminder right now (for developers) 2017-11-14 22:35:37 -06:00
e91f1c3fa4 Merge branch 'dev' into feature/custom-snooze 2017-11-14 22:20:32 -06:00
9d48b4bcdb Simplify code; change notification actions to Yes/No/Later 2017-11-14 22:07:52 -06:00
7f1a35ebe5 Merge branch 'dev' of git://github.com/rsri/uhabits into pull/cancel_notification 2017-11-14 21:54:16 -06:00
5ccd546958 Merge branch 'dev' of git://github.com/TruffelNL/uhabits into dev
# Conflicts:
#	uhabits-android/src/main/java/org/isoron/uhabits/notifications/AndroidNotificationTray.kt
2017-11-14 21:45:56 -06:00
Victor Yu
def71d8141 Merge branch 'dev' into stack_checkmark_widget 2017-11-08 21:04:45 -05:00
Victor Yu
8feb07ff1b Code review changes; Made 'stack view' design available for all widgets 2017-11-08 21:03:06 -05:00
derebaba
1edd76ae8c Added delete button to statistics screen 2017-11-02 14:21:27 +03:00
7613e6e1cb Update to Android Studio 3.0 stable 2017-10-29 14:43:17 -05:00
5629a28823 Merge pull request #348 from llunak/fix_synchronized
synchronize HabitList properly
2017-10-26 19:54:51 -05:00
Luboš Luňák
b1c2ab90d3 synchronize HabitList properly
When the app is not running and ReminderReceiver receives ACTION_SHOW_REMINDER,
the (SQLite)HabitList will start loading its data in the background for some
reason, and if the loading takes a moment, ReminderReceiver will call
the unsynchronized HabitList.getById() before the loading finishes,
failing to find the habit for which to show the notification.
2017-10-18 15:17:31 +02:00
Victor Yu
268cb0bc18 Can make either the normal checkmark widget or stackview checkmark widget 2017-10-15 20:44:21 -04:00
Victor Yu
5a78de5a25 Implemented ability to choose multiple habits for stackview 2017-10-15 13:36:54 -04:00
Victor Yu
82972d6e47 Implemented stackwidget style for checkmark widgets 2017-10-15 13:36:54 -04:00
a201273781 Refactoring 2017-10-10 21:31:31 -05:00
819a8d341f Merge branch 'llunak/custom_snooze' into dev 2017-10-09 19:16:57 -05:00
b8f7d4fad2 Add missing test screenshots 2017-10-04 21:43:34 -05:00
dea4e069c5 Add test screenshots for Oreo 2017-10-04 21:27:43 -05:00
07c7234bfc Merge branch 'master' into dev 2017-09-30 13:40:09 -05:00
bf3964a231 Merge branch 'hotfix/1.7.7' 2017-09-30 13:27:45 -05:00
657cde75d8 Disable signing config 2017-09-30 13:18:26 -05:00
c56b86d32c Bump version again
The previous number was already in use by an alpha version
2017-09-30 13:14:42 -05:00
16f20d50a0 Fix bug that caused reminders to keep repeating every few seconds
Fixes #351
2017-09-30 13:11:40 -05:00
7bb88dcb97 Bump version and update CHANGELOG 2017-09-30 12:59:02 -05:00
223b8bc5ec Merge branch 'dev' into llunak/custom_snooze 2017-09-28 07:00:51 -05:00
Luboš Luňák
e052a144bd fix testTruncate_dayOfWeek failing with some locales 2017-09-28 06:55:13 -05:00
Luboš Luňák
318caa886c fix csv export with locales that do not use dot as decimal separator 2017-09-28 06:55:13 -05:00
Luboš Luňák
46c61f9ea9 force US locale for tests 2017-09-28 06:55:13 -05:00
ba78e563cd Merge branch 'keep_position' of git://github.com/llunak/uhabits into dev 2017-09-28 06:44:36 -05:00
acb94db6d6 Introduce failing test for bug #339 2017-09-28 06:40:06 -05:00
Luboš Luňák
d2cc283bd5 don't reset habit position when editing it 2017-09-28 13:03:34 +02:00
6c66078a65 Merge pull request #337 from llunak/export_name
fix name of exported files (correct the time)
2017-09-27 20:32:26 -05:00
Luboš Luňák
be9c2ff64d fix name of exported files (correct the time)
This reverts part of a75a27ad, where this got changed presumably by mistake.
2017-09-27 20:13:29 +02:00
bb22972eb2 Minor code style changes 2017-09-24 07:19:35 -05:00
e911fb35b6 Better explain LED lights feature 2017-09-24 07:16:59 -05:00
d1490ee771 Update Gradle and Android plugin 2017-09-24 06:05:29 -05:00
6d44b4124d Merge pull request #333 from llunak/fix_sql
avoid sql error when updating sql database
2017-09-21 07:01:59 -05:00
Luboš Luňák
f8e0d07236 avoid sql error when updating sql database
The index doesn't exist in version 1.7.6 and so trying to drop it
would lead to an error, resulting in not being able to import
1.7.6 database.
https://github.com/iSoron/uhabits/issues/327
2017-09-16 19:35:50 +02:00
Luboš Luňák
e970473876 make notification snooze popup follow night mode setting 2017-09-15 13:06:42 +02:00
Luboš Luňák
cec05ccbca when asking for snooze delay, first show a list of common options 2017-09-15 13:06:37 +02:00
Luboš Luňák
aac59367dc properly handle the activity window of the snooze time dialog 2017-09-15 12:01:44 +02:00
Luboš Luňák
0421ca0549 make snooze time dialog follow night mode setting 2017-09-15 12:00:51 +02:00
Luboš Luňák
43e802fb8e implement custom snooze for notifications 2017-09-15 12:00:42 +02:00
52c4282601 Merge pull request #329 from llunak/fix_snooze
fix snooze button in notifications
2017-09-13 07:03:46 -05:00
665204bf7a Merge pull request #326 from llunak/notifications-led
Make notifications also blink the LED
2017-09-13 07:00:57 -05:00
Luboš Luňák
f52da56221 fix snooze button in notifications
The "pref_snooze_interval" preference is manipulated by the ListPreference
class, which according to its docs stores the preference as a string.
Without reverting this part of 864636705d,
this results in "java.lang.ClassCastException: java.lang.String cannot be
cast to java.lang.Long" when trying to snooze a notification.
2017-09-12 15:54:43 +02:00
Luboš Luňák
4d59783809 make LED blinking for notifications configurable 2017-09-11 15:18:42 +02:00
Luboš Luňák
a680d57cac make notifications also blink the LED 2017-09-11 13:46:49 +02:00
TruffelNL
f6620be2d9 Removed an if statement
Removed the check if a summary was already shown.
2017-08-15 23:44:41 +02:00
TruffelNL
1c2abb543b Added private variables 2017-08-15 23:09:19 +02:00
TruffelNL
87cf2871a7 Added bundled notifications
Added bundled/grouped/stacked notifications as per https://github.com/iSoron/uhabits/issues/243
2017-08-15 23:02:58 +02:00
srikanth r
e041d9041b Implemented cancel to reminders of habits. 2017-08-04 23:01:41 +05:30
dccf5eae47 Only use signing configuration if env variables are defined 2017-08-02 11:19:25 -04:00
b2a8c9c45f Remove PebbleReceiver 2017-07-26 11:39:02 -04:00
125a574ff9 Merge branch 'master' into dev 2017-07-26 10:37:08 -04:00
7bb62c197f Include Play Store plugin 2017-07-26 10:07:25 -04:00
a75a27ad42 Make the day start at 3am instead of midnight
Closes #50
2017-07-25 20:18:01 -04:00
4126f01ef1 Reactivate proguard 2017-07-25 18:09:48 -04:00
9816fc9127 Update Android plugin 2017-07-25 12:35:22 -04:00
b135aa09a3 Use more simple toString style 2017-07-24 12:14:48 -04:00
f3a64fd67a Add tests for equals, hashCode and toString 2017-07-24 11:41:12 -04:00
864636705d Implement tests for Preferences 2017-07-24 09:54:51 -04:00
281861cac5 build.sh: read keystore from environment variables 2017-07-24 00:14:46 -04:00
c05f50998f Add branch and commit hash to version name 2017-07-24 00:14:46 -04:00
b2734b179c README: Add link to latest stable release 2017-07-23 23:30:24 -04:00
00a4abf266 README: Switch to shields.io 2017-07-23 22:17:35 -04:00
47e279b3b3 Update SharedPreferencesStorage 2017-07-23 20:14:12 -04:00
87f1d635d8 Implement PropertiesStorage 2017-07-23 20:07:44 -04:00
fdcb9daadc LoopDBImporter: update table names 2017-07-23 17:26:08 -04:00
5fde0501b5 README: Add link to dev apk 2017-07-23 17:04:20 -04:00
f72799f48c README: Update badge link 2017-07-23 14:26:34 -04:00
60c62b8609 Temporarily disable proguard 2017-07-23 13:50:33 -04:00
e5bc06c138 Increase time limit 2017-07-23 13:37:49 -04:00
fa5ba0c1ef Update build.sh 2017-07-23 13:00:57 -04:00
43be70b27c build.sh: Do not abort when uninstall fails 2017-07-23 10:59:18 -04:00
89400e281e Move version numbers from build.gradle to gradle.properties 2017-07-23 10:03:09 -04:00
57dc19550d Fix errors 2017-07-22 20:05:01 -04:00
a8aa6f192c Replace Long by Timestamp 2017-07-22 16:29:08 -04:00
882ddba324 Fix acceptance tests 2017-07-22 09:28:30 -04:00
2f7509b94e Update test images (KitKat) 2017-07-21 19:31:37 -04:00
10e68aa008 Update build.sh 2017-07-21 19:30:55 -04:00
a5720e8d7f BaseViewTest: increase tolerance 2017-07-21 19:30:46 -04:00
c7aaa98935 Convert widget providers to Kotlin 2017-07-21 18:32:13 -04:00
efcb5710c0 Convert more classes to Kotlin 2017-07-21 18:32:03 -04:00
3783fd8506 Convert RingtoneManager to Kotlin 2017-07-21 18:31:49 -04:00
6f80a9c030 Convert intents and notifications to Kotlin 2017-07-21 18:17:42 -04:00
a02376497a Convert automation and database packages to Kotlin 2017-07-21 18:17:28 -04:00
180c18f6bf Merge branch 'feature/kotlin' into dev 2017-07-21 18:12:45 -04:00
2db4c06fe8 Merge branch 'master' into dev
# Conflicts:
#	app/src/androidTest/java/org/isoron/uhabits/espresso/MainTest.java
#	app/src/androidTest/java/org/isoron/uhabits/models/sqlite/SQLiteCheckmarkListTest.java
#	app/src/main/java/org/isoron/uhabits/activities/habits/list/views/HabitCardView.java
#	app/src/main/java/org/isoron/uhabits/models/sqlite/SQLiteCheckmarkList.java
#	app/src/main/java/org/isoron/uhabits/models/sqlite/SQLiteScoreList.java
#	app/src/main/java/org/isoron/uhabits/models/sqlite/SQLiteStreakList.java
#	app/src/main/java/org/isoron/uhabits/models/sqlite/records/CheckmarkRecord.java
#	uhabits-android/src/main/java/org/isoron/uhabits/activities/common/views/HistoryChart.java
#	uhabits-android/src/main/res/values-id/strings.xml
#	uhabits-android/src/test/java/org/isoron/uhabits/receivers/ReminderControllerTest.java
2017-07-18 22:54:52 -04:00
540a618ba8 Merge branch 'hotfix/1.7.6' 2017-07-18 22:45:50 -04:00
bf24cc608c Update changelog 2017-07-18 22:45:36 -04:00
a73459784e Fix NPE in HabitCardView.triggerRipple 2017-07-18 22:16:11 -04:00
de3b97dfdf Fix IndexOutOfBoundsException in HabitCardListAdapter 2017-07-18 22:13:10 -04:00
91996924d9 Never store reference to SQLiteDatabase
SQLiteDatabase closes automatically at random times. Storing a reference
to an open SQLiteDatabase eventually leads to a crash.
See: https://stackoverflow.com/questions/1483629/
2017-07-18 22:07:21 -04:00
9fe446b424 Fix crash when tapping HistoryChart 2017-07-18 21:55:15 -04:00
3857eaf5e9 Update changelog 2017-07-18 21:47:25 -04:00
e29fb58922 Fix failing tests 2017-07-18 21:47:19 -04:00
404fc869b0 Repair inconsistent data instead of throwing exception 2017-07-18 21:28:48 -04:00
001dd5a7c1 Update translations 2017-07-18 18:39:20 -04:00
7930cc8f31 Bump version to 1.7.6 2017-07-18 17:52:21 -04:00
122b300c50 Update view test images (KitKat) 2017-07-18 16:10:41 -04:00
0984f7ff5d Update Android gradle plugin 2017-07-18 06:57:22 -04:00
2d9a5ae7e2 Update links to build server 2017-07-17 22:01:37 -04:00
Jude Ibe (Toochukwu)
02f9660fda Socket.io depreciated function
Kept socket.io to previous version in gradle.
2017-07-14 10:20:51 -05:00
Jude Ibe (Toochukwu)
d3d733ab42 Build Tools Upgrade
3.0.0-alpha4 to 3.0.0-alpha6
Gradle 4
2017-07-14 10:19:56 -05:00
bb282da92d Fix tests 2017-06-23 16:25:25 -04:00
38d3b0d047 Update habit.position after reordering list 2017-06-23 12:12:23 -04:00
8ccada67d6 Import Loop DB without app restart 2017-06-23 10:24:54 -04:00
33f7acc9ca Add reordering tests for SQLiteHabitList 2017-06-23 09:29:19 -04:00
5d9563b9d8 Fix handling of null values in AndroidDatabase 2017-06-23 09:14:36 -04:00
f55dc0d811 Fix animation when card moves and updates simultaneously 2017-06-22 23:31:46 -04:00
7872983064 Fix order by position 2017-06-22 23:21:44 -04:00
ea640a8a17 Rebuild order after removing habit 2017-06-22 22:50:27 -04:00
6801d1d1ae Add more constraints on table Repetitions 2017-06-21 13:18:29 -04:00
3584affbe0 Move BaseUnitTest 2017-06-21 10:20:59 -04:00
1069fcfc62 Move importers to uhabits-core 2017-06-21 00:30:32 -04:00
59745fb90f Refactor Android database classes 2017-06-20 22:37:35 -04:00
1976160ae8 Move tests to uhabits-core 2017-06-20 22:20:46 -04:00
6dd7e49112 Move database migrations to uhabits-core 2017-06-20 21:46:30 -04:00
ecb5352134 Implement JDBC database 2017-06-20 14:13:37 -04:00
b96385c4a7 Move models.sqlite to uhabits-core 2017-06-20 12:50:57 -04:00
96c1a046d4 Merge branch 'feature/raw-sqlite' into dev 2017-06-20 10:43:04 -04:00
00660d3e36 Make filtered MemoryHabitLists update automatically 2017-06-20 10:34:21 -04:00
PrototypeNM1
b14ca5c625 Don't list archived Habits when creating Widgets. (#309)
Fixes #283
2017-06-20 06:07:15 -04:00
71fe6137be Remove old database migrations; add missing ones 2017-06-19 12:08:06 -04:00
0a5d565030 Remove dependency: ActiveAndroid 2017-06-19 11:12:31 -04:00
6d06e06840 Simplify SQLite lists 2017-06-19 09:23:40 -04:00
edeba897fb Implement SQLiteRepository 2017-06-19 09:22:48 -04:00
e4b9c50ee2 Update Gradle plugin 2017-06-19 09:22:30 -04:00
af7c4e227d Fix merge 2017-06-10 19:34:44 -04:00
96ab887545 Merge tag 'v1.7.5' into dev
1.7.5
2017-06-10 18:59:28 -04:00
526830ba61 Merge branch 'hotfix/1.7.5' 2017-06-10 18:56:22 -04:00
fe1513bb64 Fix race conditions on SQLiteScoreList 2017-06-10 16:48:53 -04:00
e06ace9ea8 Fix ArrayIndexOutOfBoundsException on FrequencyChart 2017-06-10 15:38:21 -04:00
d727dabb2b Fix snooze button on notifications 2017-06-10 15:30:51 -04:00
d17e8fcbfb Bump version to 1.7.5 2017-06-10 15:28:12 -04:00
f8a9da59dd Simplify ListHabitsActivity 2017-06-05 22:56:08 -04:00
50a6c6d9dd Remove unused code 2017-06-05 18:11:30 -04:00
8d181a6683 Simplify ShowHabitActivity 2017-06-05 18:01:13 -04:00
217516ad59 Create android-pickers module 2017-06-05 16:38:58 -04:00
fc4b610d59 Create android-base module 2017-06-05 15:58:42 -04:00
382b52e5b2 Merge tag 'v1.7.4' into dev
1.7.4

# Conflicts:
#	app/src/main/java/org/isoron/uhabits/models/sqlite/SQLiteCheckmarkList.java
#	app/src/main/java/org/isoron/uhabits/models/sqlite/SQLiteScoreList.java
#	uhabits-core/src/main/java/org/isoron/uhabits/core/models/ScoreList.java
2017-06-05 09:20:47 -04:00
be3d7145ab Merge branch 'hotfix/1.7.4' 2017-06-04 17:36:17 -04:00
cf66587644 ScoreList: make getValue synchronized 2017-06-04 17:29:41 -04:00
0dc9ec2e5f Expire caches on SQLite lists 2017-06-04 17:24:18 -04:00
0a375ded96 Silently ignore missing habits 2017-06-04 17:07:07 -04:00
fa5d6f8fee Bump version 2017-06-04 17:01:40 -04:00
277738f94d Fix default color and failing tests 2017-06-04 13:14:45 -04:00
cf25229fbc Merge branch 'dev' into pull/austil 2017-06-04 12:59:15 -04:00
7652d71c94 Uninstall test APK before running tests 2017-06-04 12:46:30 -04:00
74e0dcf706 Disable PebbleReceiver tests on KitKat 2017-06-04 12:46:16 -04:00
4e1cc6dc80 Fix tests for KitKat 2017-06-04 12:21:29 -04:00
c34f9f9e9f Merge branch 'dev' of https://github.com/austil/uhabits into pull/austil 2017-06-04 11:30:10 -04:00
ed9066f393 Implement alternative checkmark algorithm
Fix failing tests
2017-06-04 10:58:00 -04:00
96e1771c25 Remove inferred tables from SQLite database 2017-06-03 10:51:17 -04:00
austil
d0d3c7eef5 More Colors - requested changes 2017-06-03 15:16:09 +02:00
6875fc0428 Move notifications and reminders to uhabits-core 2017-06-02 19:30:39 -04:00
b88b3a683d Move preferences to uhabits-core 2017-06-02 18:24:12 -04:00
d97f94075d Implement widget test 2017-06-02 15:25:24 -04:00
28f095e56a Implement additional UI tests 2017-06-02 14:45:06 -04:00
ead87519b1 UI tests: reset state programmatically 2017-06-02 13:16:15 -04:00
7cfe3355e4 Downgrade Mockito to 1.0 on AndroidTest 2017-06-01 21:55:13 -04:00
a51ecaaf24 Annotate all Android tests 2017-06-01 21:55:13 -04:00
322645da9b Update badge link 2017-05-31 21:35:07 -04:00
5eb63df633 Merge branch 'modules' into dev 2017-05-31 21:17:28 -04:00
e4b5a3ea45 Implement acceptance tests for some basic features 2017-05-31 18:24:22 -04:00
88c1e73720 Merge tag 'v1.7.3' into dev
1.7.3
2017-05-30 11:11:42 -04:00
0393e58d3b Merge tag 'v1.7.3' into dev
1.7.3
2017-05-30 10:38:07 -04:00
534e6c2d9d Merge branch 'hotfix/1.7.3' 2017-05-30 09:34:12 -04:00
b6501c9a29 Fix NullPointerException 2017-05-30 09:22:15 -04:00
238a1c724d Bump version and update changelog 2017-05-30 09:06:50 -04:00
34ca9d17a2 Make usage of BundleSavedState more robust 2017-05-30 09:05:05 -04:00
6ccfb53329 Add missing tests for RepetitionList and Habit 2017-05-30 08:19:28 -04:00
8a29fbf07d Merge branch 'hotfix/1.7.3' into modules
# Conflicts:
#	uhabits-android/src/androidTest/java/org/isoron/uhabits/BaseAndroidTest.java
#	uhabits-android/src/main/java/org/isoron/uhabits/models/sqlite/SQLiteScoreList.java
#	uhabits-core/src/main/java/org/isoron/uhabits/core/models/CheckmarkList.java
2017-05-29 22:55:08 -04:00
e844390614 Improve performance of repeated getTodayValue calls 2017-05-29 22:22:31 -04:00
223aee3be2 Add Test Butler APK 2017-05-29 09:14:02 -04:00
745d07024c Remove unused permissions 2017-05-29 08:37:49 -04:00
94025c5262 Add test for BundleSavedState 2017-05-28 22:26:36 -04:00
ab09eb8a03 Update CI build script 2017-05-28 17:04:04 -04:00
e826c80ff2 Fix Android tests 2017-05-28 15:26:28 -04:00
6255fe2d12 Make generated classes work on Android Studio 2017-05-28 11:39:07 -04:00
1746920699 Rename uhabits-core package 2017-05-28 11:38:20 -04:00
c9b62669de Merge branch 'dev' into modules 2017-05-28 09:44:55 -04:00
d2f367678f Merge tag 'v1.7.2' into dev
v1.7.2
2017-05-28 00:47:08 -04:00
5e00d07b73 Merge branch 'hotfix/1.7.2' 2017-05-28 00:41:37 -04:00
28b6ae7014 Apply dark theme on dialogs
Fixes #291
2017-05-28 00:31:48 -04:00
2a1bf5fc2e Update CHANGELOG 2017-05-27 23:38:58 -04:00
ef7483f9dc Make SQLiteHabitList.toList synchronized 2017-05-27 23:37:24 -04:00
bbb9ed8f99 Update translations 2017-05-27 23:30:45 -04:00
c49d576871 Fix crash at startup 2017-05-27 23:29:35 -04:00
bc66ae4f7a Bump version to 1.7.2 2017-05-27 23:28:16 -04:00
56c5fb6c9d Write missing tests 2017-05-27 22:46:33 -04:00
d8d4c4f55e Write tests for ListHabits behaviors 2017-05-27 20:33:30 -04:00
70423ddb0a Move ListHabits controllers to uhabits-core 2017-05-27 18:52:06 -04:00
94c70485b7 Remove unit tests for uhabits-android 2017-05-27 10:31:05 -04:00
3e558be4d4 Move ListHabitsBehavior to uhabits-core 2017-05-26 22:04:59 -04:00
95385fa8f4 Activate coverage report for uhabits-core 2017-05-26 18:38:08 -04:00
fa4944700c Move UI behavior to uhabits-core 2017-05-26 16:33:21 -04:00
df0cf57984 Move tests to androidTest 2017-05-25 18:41:59 -04:00
29d1de46e7 Reorganize tests 2017-05-25 15:59:03 -04:00
cb4ab3b436 Move ExportCSVTask to uhabits-core 2017-05-25 12:50:38 -04:00
370e7343d7 Move commands to uhabits-core 2017-05-25 10:00:56 -04:00
acd653db70 Create org.isoron.androidbase package 2017-05-25 09:31:54 -04:00
51ca4aa98e Move remaining model classes 2017-05-25 08:54:21 -04:00
d23b59ced2 Move some models 2017-05-25 08:24:22 -04:00
f18ac9db48 Create module uhabits-core 2017-05-25 08:16:55 -04:00
c20ca3921f Rename android module to uhabits-android 2017-05-25 08:00:00 -04:00
96f620455f Update toolchain 2017-05-25 00:02:02 -04:00
2dd14dbf04 Small changes to coverage badge 2017-05-24 17:57:28 -04:00
8346f28497 Generate code coverage badges 2017-05-24 17:33:25 -04:00
97967b2b2e Improve build script 2017-05-24 00:23:01 -04:00
cf6a257143 Activate ProGuard; test signed release APK instead of debug 2017-05-23 19:13:30 -04:00
275125d230 Update dependencies 2017-05-23 16:25:11 -04:00
cb7b569d4e Use 'adb emu kill' to stop emulator 2017-05-23 12:21:53 -04:00
89b6f4c5cc Fix compilation error when ROBO_SDK is defined 2017-05-23 11:58:29 -04:00
8d555eb837 Read Robolectric version from environment 2017-05-23 11:39:17 -04:00
9288528f94 Fix assets path 2017-05-23 11:07:12 -04:00
e92ffb3894 Drop support for Android ICS and Jelly Bean; remove obsolete code 2017-05-23 10:50:11 -04:00
96bdb42365 Remove unused files 2017-05-23 00:18:22 -04:00
ecb207d322 Generate XML reports for instrumented tests 2017-05-22 22:37:08 -04:00
64001604cf Update link to build server 2017-05-22 14:24:22 -04:00
b9d3d22894 Use absolute paths on run_tests 2017-05-22 13:22:16 -04:00
25705297cb Update run scripts 2017-05-21 21:12:08 -04:00
532637ef7e Update link to CI server 2017-05-21 13:14:26 -04:00
0a1907ee2c Merge tag 'v1.7.1' into dev
v1.7.1
2017-05-21 10:20:58 -04:00
fa416adbb9 Merge branch 'hotfix/1.7.1' 2017-05-21 10:20:48 -04:00
8b835b9918 Update CHANGELOG 2017-05-21 10:10:30 -04:00
471c5d341f Update translations 2017-05-21 10:03:13 -04:00
d0e76d3d55 Implement tests for BaseScreen 2017-05-20 23:36:07 -04:00
1832ea639b Implement tests for BaseActivity 2017-05-20 22:10:37 -04:00
cd3944b90f Add Robolectric dependency; implement a basic test 2017-05-20 20:05:12 -04:00
9f2f8f7117 View tests: create wrapper for getDimension; other fixes 2017-05-17 22:41:06 -04:00
1b97b9040d View tests: use fixed screen density 2017-05-17 19:20:44 -04:00
austil
8a80a66a80 More Colors for habits 2017-05-06 16:38:14 +02:00
austil
894423e49f Revert "New color but Sort By Color broken"
This reverts commit 4ce9013e6a.
2017-05-06 13:27:28 +02:00
austil
4ce9013e6a New color but Sort By Color broken 2017-05-06 13:25:17 +02:00
96b95edef8 Separate expected view snapshots according to version 2017-04-22 23:12:44 -04:00
704854fdf1 View tests: adjust similarity cutoff 2017-04-22 22:01:06 -04:00
6e0393f611 Improve view tests 2017-04-22 00:10:42 -04:00
e6ceed9ec9 Update README.md 2017-04-21 20:13:42 -04:00
cf3d289145 Enable XML reports 2017-04-21 19:19:42 -04:00
6bd59aad97 Update code coverage gradle command 2017-04-21 18:53:17 -04:00
a5567d491f Enable test coverage 2017-04-21 18:26:29 -04:00
9604c26973 Remove inactive espresso tests; fix other tests 2017-04-21 12:03:55 -04:00
81ad1ba8c8 Merge branch 'feature/parallel' into dev 2017-04-21 10:08:06 -04:00
1d68122a6f Replace layout inflation by code 2017-04-20 18:14:06 -04:00
7d9d45ffed Small performance changes 2017-04-20 16:39:41 -04:00
50e21b2cc1 Merge branch 'hotfix/1.7.1' into dev 2017-04-19 19:47:49 -04:00
57296745b3 Improve performance of CheckmarkButtonView 2017-04-19 14:33:59 -04:00
fb1b1221d3 Merge remote-tracking branch 'origin/dev' into dev 2017-04-15 18:10:08 -04:00
788c790f9e Detect network changes 2017-04-15 17:13:41 -04:00
293d838d80 Move Sync to foreground service 2017-04-15 16:34:15 -04:00
3da996b8a4 Update SyncManager 2017-04-14 23:08:00 -04:00
08e3c9cc40 Replace toJSON methods by Gson 2017-04-14 20:32:00 -04:00
13b4128777 Update code coverage 2017-04-14 10:56:38 -04:00
b4e79c3f4b Merge branch 'feature/sync' into dev 2017-04-13 23:34:57 -04:00
2d07f5e924 Create switch for numerical habits feature 2017-04-13 21:44:23 -04:00
Mihail Stefanov
cb29fef17e Use of Cyrillic letters to display Bulgarian (#276)
I switched the phonetic notation with Cyrillic letters to denote the Bulgarian language.
2017-04-13 19:08:33 -04:00
1d76760dc8 Create hidden settings for experimental features 2017-04-12 23:19:22 -04:00
b6994034d2 Fix failing test 2017-04-12 13:09:28 -04:00
8fc0c072e5 Merge branch 'artem-p-reminderDaysFix' into dev 2017-04-12 11:25:33 -04:00
e6deb1f281 Merge branch 'hotfix/1.7.1' into dev 2017-04-12 11:25:28 -04:00
artem-p
bb0d43018e Fix resetting reminder days 2017-04-12 11:17:27 -04:00
140ab34a76 Verify database version before importing 2017-04-11 22:03:16 -04:00
0d6ad26505 Ignore exception when habit is not found 2017-04-11 21:19:03 -04:00
65cc99dbf7 Switch from View.BaseSavedState to Support Library's AbsSavedState
See https://code.google.com/p/android/issues/detail?id=196430
2017-04-11 17:49:55 -04:00
6855ef9d5e Update translations 2017-04-11 17:26:06 -04:00
4c58b084c6 Fix missing dialog title 2017-04-11 17:19:18 -04:00
5c8e522646 Fix header labels for RTL languages such as Arabic 2017-04-11 17:14:25 -04:00
55da0759d4 Bump version 2017-04-11 16:58:35 -04:00
Dmitriy Bogdanov
814b734ad3 Import java.text.DecimalFormat instead of one from ICU (#273) 2017-04-10 08:05:08 -04:00
6f5941472b Merge remote-tracking branch 'origin/dev' into dev 2017-04-09 18:15:55 -04:00
7699423aa7 Merge tag 'v1.7.0' into dev
1.7.0
2017-04-09 18:14:53 -04:00
692fe3218f Merge branch 'release/1.7.0' 2017-04-09 18:13:52 -04:00
387930c08d Fix icon size, remove unused icons 2017-04-09 17:37:14 -04:00
6bd31f9607 Add Basque, Catalan, Persian and Romanian languages 2017-04-09 17:16:08 -04:00
9aafe7160c Update translation links 2017-04-09 16:56:04 -04:00
5cc4aac67a Update translations 2017-04-09 16:41:32 -04:00
831421bc98 Ignore CrowdIn configuration files 2017-04-09 16:03:00 -04:00
e48dab9ed3 Update translation link 2017-04-04 17:47:14 -04:00
161d8f2517 Update changelog 2017-03-31 09:12:53 -04:00
bfe4b822b3 Bump version 2017-03-31 08:15:04 -04:00
53a599c6b8 Merge branch 'feature/numerical-habits' into dev 2017-03-30 23:00:12 -04:00
103c0b57f8 Unify habit creation dialogs 2017-03-28 16:59:08 -04:00
7de69c1c10 Simplify BooleanHabitDialog subclasses and factories 2017-03-28 13:36:49 -04:00
fe7e8ef039 Refactor habit creation dialogs 2017-03-28 12:06:09 -04:00
19f4a19dba Minor changes to BarChart 2017-03-27 19:25:53 -04:00
b66da24e39 Fix the form fields containing examples 2017-03-27 18:41:52 -04:00
3dd33274e4 Small changes to formatValue 2017-03-27 17:50:57 -04:00
c61834e604 Color days on HistoryChart according to target 2017-03-26 16:36:28 -04:00
e082705b0c First version of BarChart 2017-03-26 16:16:13 -04:00
83ce92d8ac Allow fractional values to be entered 2017-03-26 13:19:01 -04:00
177525817c Small changes to the layout of NumberButtonView 2017-03-26 10:57:04 -04:00
1dfa0c6b0d Hide completed according to the target value 2017-03-26 10:32:27 -04:00
b3f039d658 Make score take target value into account 2017-03-26 10:14:23 -04:00
7d2e8573f8 Persist unit and target value of a habit 2017-03-25 19:57:38 -04:00
5653651c0d Update score calculation
The value of a score is now a double. For boolean habits, this number goes from zero
to one and corresponds to the percentage. For numerical habits, it now corresponds
to a weighted average of the checkmark values. Also, for non-daily boolean habits, the
score now increases with implicit checkmarks.
2017-03-25 12:31:19 -04:00
d3b540199c Switch score values from int to double 2017-03-25 10:46:35 -04:00
f0430ffeb3 Use alternative design with units on NumberButtonView 2017-03-25 09:43:52 -04:00
d03edf2895 Update habit creation dialogs 2017-03-24 16:47:40 -04:00
5c1ccfe6fe Fix small issues with the number picker 2017-03-24 10:13:19 -04:00
5b9e90fe7a Persist repetition values 2017-03-24 09:41:52 -04:00
ac32460859 Create number picker dialog 2017-03-24 08:20:59 -04:00
e2a8de3acf Update controllers and HabitCardView 2017-03-23 19:09:44 -04:00
7bf9f88ee3 Implement NumberButtonView and related classes 2017-03-23 18:26:58 -04:00
19e79a8559 Fix failing test 2017-03-20 22:32:53 -04:00
876d4f0ac7 Merge branch 'feature/scroll-header' into dev
Fixes #155
2017-03-20 20:05:26 -04:00
f4f7faf3a4 Fix a few issues with header scrolling 2017-03-20 20:00:10 -04:00
56f2ae57fe Persist scrolling after configuration change 2017-03-20 18:53:48 -04:00
3fe09efe9b Scroll checkmarks 2017-03-19 20:36:16 -04:00
f0de29fbfe Make HeaderView scrollable 2017-03-19 18:31:43 -04:00
324facfffd Re-enable haptic feedback on CheckmarkButtonView 2017-03-19 16:35:57 -04:00
03e58f9ef2 Preserve position of ScrollableChart on configuration changes
Fixes #240
2017-03-18 23:57:54 -04:00
e6c9f7f0c9 Preserve ScrollView position after configuration change
Fixes #239
2017-03-18 22:41:32 -04:00
42bdedb86a Update dependencies 2017-03-18 22:40:38 -04:00
ab0c510fda Rename export action and move to overflow menu 2017-03-18 22:22:07 -04:00
e46fd58664 Fix ImportTest on Nougat 2017-03-17 22:49:52 -04:00
8532bd402e Update APK filename 2017-03-17 22:11:48 -04:00
2c599b18ef Fix ambiguous reference to R 2017-03-17 21:52:51 -04:00
0d78ba4ba9 Update gradle 2017-03-17 21:52:13 -04:00
Janet Do
611dfa00a5 Export data from the statistics screen
Closes #27
2017-02-02 21:31:37 -05:00
Anirudha Agashe
54a195243d Fixed failing build
Replaced static method to obtain context with appropriate dependency
2017-01-18 12:58:56 -06:00
Anirudha Agashe
4fc30fae53 Remove use of static context from HabitsApplication class (#224)
Remove static context from application class. Replace static method to obtain context with appropriate dependency. Remove context from controller. Add auto factory to export db task.
2017-01-09 23:09:05 -05:00
b3fe9c65d2 Refresh data at midnight
Fixes #221
2016-12-31 18:24:26 -05:00
09f1ae8765 Update circle.yml 2016-12-31 12:30:10 -05:00
0a8b763ece Make TimePicker slightly smaller
Fixes #219
2016-12-30 12:58:37 -05:00
edd5f25529 Update circle.yml 2016-12-25 23:56:34 -05:00
d81fdb41dc Remove temp file after importing 2016-12-25 23:50:38 -05:00
02c8810e46 Bump targetSdkVersion to 25 2016-12-25 23:05:47 -05:00
6adf8061d3 Use FileProvider instead of File URIs 2016-12-25 23:05:17 -05:00
d19d57e5df Use Storage Access Framework when importing files 2016-12-25 11:54:08 -05:00
c20d5c8729 Make model classes thread-safe 2016-11-24 20:06:28 -05:00
fd82e6c24b Remember last used order 2016-11-24 06:00:02 -05:00
56263efa39 Sort by score 2016-11-24 05:45:08 -05:00
d5eacba303 Disable drag-and-drop when automatically sorting 2016-11-24 05:27:26 -05:00
222261c674 Add order menu 2016-11-23 06:35:07 -05:00
b1a06df7f8 Implement automatic sorting for SQLHabitList 2016-11-23 05:58:46 -05:00
a1fc7dd0d1 Implement automatic sorting for MemoryHabitList 2016-11-04 05:59:34 -04:00
Justin Inácio
10131d5124 Allow intervals larger than 99 days (#202) 2016-11-02 06:13:31 -04:00
aa94959ad2 Merge tag 'v1.6.2' into dev
v1.6.2
2016-10-13 07:09:19 -04:00
967dc2586b Merge branch 'hotfix/1.6.2' 2016-10-13 07:09:11 -04:00
908fd1d6ae Fix NoSuchMethodError on Android 4.1 2016-10-11 06:34:22 -04:00
45fd8a29e1 Merge tag 'v1.6.1' into dev
v1.6.1
2016-10-10 12:10:23 -04:00
4624acd477 Merge branch 'hotfix/1.6.1' 2016-10-10 12:10:14 -04:00
c8cd4fa389 Delete old database cache 2016-10-10 11:39:18 -04:00
8c4fab28aa Merge tag 'v1.6.0' into dev
v1.6.0
2016-10-10 09:54:29 -04:00
d6b91cef01 Merge branch 'release/1.6.0' 2016-10-10 09:54:20 -04:00
e273fe7375 Automatically repair inconsistent databases before crashing 2016-10-10 08:49:16 -04:00
ab3b946c65 Update translations 2016-10-09 18:23:24 -04:00
38cd47c199 Remove empty title bar on TimePickerDialog 2016-10-09 13:18:36 -04:00
fa64bd389d Update list of developers 2016-10-09 12:47:33 -04:00
d03578fd9e Update changelog 2016-10-09 12:40:02 -04:00
79ae181df2 Bump version to 1.6.0 2016-10-09 12:14:03 -04:00
320dca9070 Automatically change order of days on pre-lollipop 2016-10-09 12:05:57 -04:00
f3b9fc825a HabitMatcher: only compute today's value if needed 2016-10-09 11:58:03 -04:00
50da14022f Fix bug that prevented ringtone from being saved 2016-10-09 11:47:30 -04:00
84a02fe541 Remove duplicate shadows and some duplicate code 2016-10-09 11:32:50 -04:00
b3aa3d14c0 Remove unused resources 2016-10-04 07:52:36 -04:00
e9cdfd23c4 Fix widgets on API 15 2016-10-04 07:43:40 -04:00
659ad2d817 Fix card background color (pre-lollipop) 2016-10-04 07:37:40 -04:00
d537ba0dfa Fix layout issues on pre-lollipop 2016-10-04 07:29:51 -04:00
7c14725d88 Always show menu icons 2016-10-04 06:57:01 -04:00
638b3f763c Fix some crashes on old devices 2016-09-30 08:10:25 -04:00
f876fc50bb Only recalculate all list positions when repairing database 2016-09-30 07:24:29 -04:00
919504ccfb Render widgets in a separate thread 2016-09-30 07:03:23 -04:00
1a8d9e72a1 Add Tasker screenshots 2016-09-25 11:55:16 -04:00
8e82f369c7 Implement Tasker/Locale plugin 2016-09-25 11:01:17 -04:00
0a5677211e Remove reference to MainActivity 2016-09-24 17:02:30 -04:00
65071797c9 SettingsActivity: Fix toolbar color in night mode 2016-09-24 16:49:45 -04:00
df1751b21a Refactor AboutActivity 2016-09-24 16:41:14 -04:00
4e952dd87a Remove MainActivity and use activity-alias 2016-09-24 16:03:41 -04:00
Nikhil
132dce8919 Improve error message on widget
Fixes #168
2016-09-19 21:24:32 -04:00
5c8450191a Make notifications actionable on the Pebble
Closes #126
2016-09-19 18:32:03 -04:00
b1d00598eb Add option to repair database 2016-09-18 08:09:18 -04:00
518ade3165 Add some database checks 2016-09-18 08:08:56 -04:00
dc5d7930a6 Merge pull request #173 from JotraN/dev
Add exporting scores and checkmarks files with multiple habits (#68).
2016-09-17 12:38:27 -04:00
jotran
ec34043041 Add exporting scores and checkmarks files with multiple habits (#68).
Add writeMultipleHabits to write a scores file and a checkmarks file
that contains scores and checkmarks of multiple habits.
Add getTimeframe because it was necessary to get the timeframe between
all habits so that row data could be populated correctly for habits that
started before/after other habits.
Move writeCheckmarks to below writeScores since it wasn't called until
after writeScores in writeHabits.

Add getByInterval to ScoreList, MemoryScoreList, and SQLiteScoreList to
get scores between a given interval - simiarly to CheckmarkList.

Add getValues (ScoreList) to get all values between a given timeframe.

Add getNewest to get the newest repetition in a list and to correspond
with getOldest.

Add getDaysBetween to DateUtils to quickly get the number of days
between two timestamps.

Add tests for the new functions.
2016-09-17 09:04:49 -07:00
4d5407a5cc Fix bug on compute methods that prevented them from recomputing old values 2016-09-16 13:17:52 -04:00
904489d812 Remove debug log 2016-09-16 11:41:20 -04:00
d2436a3165 Merge pull request #174 from Donaira/dev
Increase width of name column according to screen size
2016-09-14 15:35:21 -04:00
Donaira Tamulynaitė
bc19858bca Habit label takes up to 1/3 screen width. 2016-09-14 13:03:38 +03:00
a998a62cdb Remove notification when habit is deleted 2016-09-11 11:35:32 -04:00
1a89bb02be Add option to make notifications sticky 2016-09-11 10:40:43 -04:00
6e8ea471aa Do not cancel notifications automatically 2016-09-11 09:55:47 -04:00
ec42fb54f4 Do not store position of ViewHolder 2016-09-11 09:35:53 -04:00
c46fa84135 Fix bug that made it impossible to disable a reminder 2016-09-11 09:18:06 -04:00
16dcc0cbc2 Fix tests 2016-09-11 09:04:39 -04:00
6f10039aba Merge pull request #171 from regularcoder/dev
Add repetition count to overview card
2016-09-11 08:10:34 -04:00
RegularCoder
5cbc0a3292 Add repetition count to overview card, for #115 2016-09-05 21:14:12 -04:00
7f67a9eb63 Revert concurrent AsyncTasks 2016-09-03 09:37:16 -04:00
d3f7ebd60c SQLiteHabitList: fix corrupted order automatically 2016-09-03 09:33:09 -04:00
461fe1f0b6 Improve performance 2016-09-03 09:25:23 -04:00
8eb9f398d5 Allow multiple AsyncTasks to run concurrently
Fixes #134
2016-09-03 09:00:20 -04:00
f178bcbdd2 CheckmarkButtonView: avoid layout inflation 2016-09-03 08:00:36 -04:00
66c3136fad Allow views to be rendered by the layout editor 2016-09-03 07:46:41 -04:00
4b04966617 Update AMOLED mode upon exiting settings
Fixes #118
2016-09-02 22:24:21 -04:00
3ea21fe823 Update order of checkmark buttons automatically upon exiting settings 2016-09-02 21:13:56 -04:00
e0df69beb6 Prevent progress bar from flickering 2016-09-02 21:03:09 -04:00
b5cd4584b2 Disallow empty WeekdayLists 2016-09-02 21:02:38 -04:00
af7c8b1f2e Merge pull request #170 from regularcoder/dev
Fix issue#65 by setting launchMode to singleTop
2016-09-02 06:30:48 -04:00
RegularCoder
283cb2a3f0 Fix issue#65 by setting launchMode to singleTop 2016-09-01 21:43:28 -04:00
79ddbca307 Fix ripple when days are reversed 2016-08-29 20:57:43 -04:00
46a0777195 Restore progress bars 2016-08-29 20:53:48 -04:00
b35305e16c Preferences: update link to AboutActivity 2016-08-29 20:03:25 -04:00
8c4a745ecb Merge pull request #165 from klanmiko/enhancement/archive
Fix #161 reminder disable on archive
2016-08-22 22:38:03 -04:00
klanmiko
e5162c48ab Scheduler should ignore archived habits
Also consider changing "archive" to "inactive"
2016-08-22 19:00:36 -07:00
b54c4de5f7 ShowHabitRootView: update title automatically
Fixes #162
2016-08-22 17:02:20 -04:00
2bdc0b4f5e Update unit tests for ListHabitsMenu 2016-08-22 16:48:58 -04:00
22db61db01 Fix crash on startup and after dismissing notification 2016-08-22 16:40:23 -04:00
c7cfbd1643 Allow cards to be rendered by the layout editor 2016-08-07 08:43:18 -04:00
8655437f3e Change 'show completed' to 'hide completed' 2016-08-05 19:37:47 -04:00
3ad3cf54ec Add tests for HabitCardView 2016-08-05 07:54:06 -04:00
9a470cc61d Initialize db earlier; fixes crash 2016-08-05 06:30:32 -04:00
fc2087fe68 Write tests for ListHabits controller, menu and screen 2016-08-04 21:56:38 -04:00
7b8ab6a625 Dismiss notification automatically 2016-08-04 07:46:10 -04:00
2d40fb0b82 Write tests for receivers 2016-08-04 07:34:38 -04:00
c961045b63 Call refresh from UI thread 2016-08-04 06:15:43 -04:00
d0db3359fe Allow StyledResources to receive a fixed theme for testing 2016-08-03 22:27:49 -04:00
11378e07bf Properly initialize appComponent 2016-08-03 22:13:30 -04:00
8132188e46 Replace Singleton by AppScope 2016-08-03 07:48:58 -04:00
7eb454788f Refactor receivers 2016-08-03 07:37:00 -04:00
c262adbe85 Move Preferences to their own package 2016-07-31 08:47:20 -04:00
05aa5b1172 Replace InterfaceUtils theme methods by ThemeSwitcher 2016-07-31 08:42:40 -04:00
dd3d78b82c Filter Dagger classes from coverage report 2016-07-31 08:39:47 -04:00
3d4ae2126b Remove DialogFactory 2016-07-31 08:03:07 -04:00
5aa9114aff Fix name of Ukrainian language 2016-07-30 21:58:06 -04:00
77e0ad007f Update list of developers 2016-07-30 21:56:27 -04:00
2e53b75705 Merge pull request #151 from sciamano/freq2
relative size of the marks in the frequency view
2016-07-30 21:24:30 -04:00
Denis
0ec03035f5 maximal frequency of the data 2016-07-30 21:26:09 +02:00
Denis
67ae48b527 radius and color of the mark in the frequency view 2016-07-30 21:26:06 +02:00
Denis
82d2931559 fix code duplication 2016-07-30 21:26:01 +02:00
a527140802 Use the same HabitCardListCache for all activities
Fixes #147
2016-07-29 07:40:56 -04:00
9ec3d9048a Make Preferences listen for external changes 2016-07-29 07:28:44 -04:00
3ed4f3b280 Make scrolling very smooth again 2016-07-29 07:21:47 -04:00
f101975320 Take timezone into account when scheduling alarms 2016-07-29 07:07:02 -04:00
3a7f27755c Use hashmap on AndroidTaskRunner 2016-07-29 07:06:49 -04:00
3a3be664f7 Fix some bugs on fragments and model listeners 2016-07-28 21:45:54 -04:00
33ae8d1edf Show empty message at startup 2016-07-28 21:45:54 -04:00
cb3b8f2cde Reorganize sections and add GPLv3 logo 2016-07-28 18:30:11 -04:00
307e025b1a Fix CheckmarkListTest 2016-07-28 08:00:01 -04:00
03dd24d17b Clean up BaseUnitTest 2016-07-28 07:42:03 -04:00
5f4ac21a41 Small changes 2016-07-27 20:29:13 -04:00
b33616d363 Remove old .gitmodules 2016-07-27 19:30:37 -04:00
b7d1c6d254 Update copyright notice 2016-07-27 19:01:05 -04:00
bd30ceee1b Fix small layout issue. 2016-07-27 18:58:51 -04:00
fe96313162 Update NOTICE.md 2016-07-27 18:56:24 -04:00
938fe3325e Remove disabled test 2016-07-27 18:13:02 -04:00
237de035bb Remove remaining static references to app component 2016-07-27 18:09:36 -04:00
ddc85ced0b Remove waitForTasks 2016-07-27 17:10:07 -04:00
eceb1bfb7d Remove most static references to app component; fix tests 2016-07-27 17:05:51 -04:00
3b737996e9 Reorganize packages 2016-07-27 00:03:59 -04:00
7f75f9b6da Construct ListHabits using dagger 2016-07-26 23:52:39 -04:00
74f78f0fdf Improve usage of dagger 2016-07-26 19:26:42 -04:00
ef63dd19e7 Fix reference to MainActivity 2016-07-25 17:03:09 -04:00
c7878d979f Switch from toasts to snackbars 2016-07-25 08:58:28 -04:00
ebd294be63 Split InterfaceUtils 2016-07-25 08:31:26 -04:00
748cec06a8 Dagger: replace injects by getters 2016-07-23 21:18:20 -04:00
15a4a2c002 Refactor reminders; replace int by WeekdayList 2016-07-23 19:19:22 -04:00
37a9e793e7 Add tests for HabitCardListCache; refactor TaskRunners 2016-07-23 18:06:03 -04:00
d54de9df89 Refactor tasks; break progress bars 2016-07-23 11:45:59 -04:00
94a5db2208 Add view tests 2016-07-22 08:01:44 -04:00
a984467516 Some refactoring; add tests for ListHabitsScreen 2016-07-21 22:48:37 -04:00
d6dacfd24b Refactor reminder scheduling, add tests 2016-07-20 17:01:24 -04:00
3938ae6fa8 Fix test sizes 2016-07-18 20:57:21 -04:00
7dbbc51a9a Add task for combined coverage report 2016-07-18 10:53:23 -04:00
c9d1bb821c Refactor pending intents 2016-07-18 09:07:21 -04:00
77f406dcee Refactor broadcast receivers and add a public receiver
Fixes #6
2016-07-17 17:28:14 -04:00
61b0b1fdea Use separate broadcast actions for widgets and notifications 2016-07-17 09:32:42 -04:00
8cde0d6aca HistoryChart: make toggling faster 2016-07-17 09:32:21 -04:00
fa9f90a09e Refactor HeaderView; update list on resume 2016-07-17 08:59:34 -04:00
28eb615b0e Notification: add checkmark instead of toggling 2016-07-17 08:43:14 -04:00
c1e10e09a5 Refresh list after importing DB 2016-07-17 08:30:07 -04:00
35e93fddc6 Use dynamic number of streaks on widget 2016-07-17 08:28:19 -04:00
33596a2797 Restore dynamic number of checkmarks 2016-07-17 08:02:31 -04:00
207f026ceb Fix habit creation 2016-07-16 10:35:55 -04:00
0f12d02990 Use same cache for every SQLHabitList 2016-07-16 10:12:06 -04:00
bc4bbaefac Remove some drag-and-drop glitches 2016-07-15 09:33:57 -04:00
a802053ef7 Update .gitignore 2016-07-15 09:33:07 -04:00
cf98d1a5c3 AndroidTest: Increase timeout 2016-07-14 11:54:15 -04:00
cc1e56894b Fix test scripts 2016-07-14 11:30:21 -04:00
06b5f89b7a Make habit deletions instantaneous
Fixes #133
2016-07-14 10:57:45 -04:00
17423b3ecd Fix most issues with the RecyclerView; improve loading 2016-07-14 10:15:56 -04:00
1526f617c5 Remove most animation glitches on RecyclerView; disable reordering 2016-07-11 22:06:30 -04:00
365eb400d0 Add proguard file 2016-07-11 09:04:36 -04:00
785d57c778 Merge branch 'dev' of github.com:iSoron/uhabits into dev 2016-07-11 09:03:24 -04:00
8e9f1aa166 Add basic API for the Pebble app 2016-07-11 08:47:00 -04:00
b2f97cb0a5 Merge pull request #145 from ajbarnes/dev
Add 24hr snooze. Fixes #103
2016-07-06 04:39:00 -04:00
Adam Barnes
4c1ff4f0a8 Add 24hr snooze. Fixes #103 2016-07-05 23:44:16 -04:00
94a48133ec Merge branch 'feature/recyclerview' into dev 2016-07-01 10:22:06 -04:00
71dd6cde89 Restore drag & drop and click; remove DragSortListView library 2016-07-01 09:23:07 -04:00
b33420cabb Replace ListView with RecyclerView 2016-07-01 08:03:30 -04:00
dbe268b8e9 Add simple filter to menu 2016-06-30 07:23:28 -04:00
3d53812d7f Restore CircleCI badge 2016-06-29 21:31:34 -04:00
5b4b436f0f CircleCI: use JDK8 2016-06-29 21:10:22 -04:00
6ef2983906 Implement filter by colors 2016-06-29 20:12:09 -04:00
b749f7f391 Fix CircleCI scripts 2016-06-29 20:11:39 -04:00
922b234307 Initial implementation of filters 2016-06-29 19:49:19 -04:00
31fdae1c8b Merge branch 'feature/refactoring-mvc' into dev 2016-06-29 12:23:04 -04:00
5d61fdd3d0 Write tests for HintView 2016-06-29 10:03:56 -04:00
588b45d47b Merge branch 'dev' into feature/refactoring-mvc 2016-06-28 22:48:45 -04:00
9a059275ce Merge branch 'dev' into feature/refactoring-mvc 2016-06-28 22:46:17 -04:00
4ae813e6f9 Restore all widgets 2016-06-28 22:39:24 -04:00
52701666bc Start refactoring widgets 2016-06-28 12:11:34 -04:00
a90e26691f Fix HistoryEditorDialog 2016-06-26 17:10:17 -04:00
f0c62a5908 Update run_tests script to run JVM tests 2016-06-26 17:07:38 -04:00
e899a70eb0 Fix most tests 2016-06-25 05:53:19 -04:00
aa41717c66 Remove CircleCI temporarily 2016-06-25 05:43:49 -04:00
6ba6d7c8c1 Refactor ShowHabit screen; remove fragment 2016-06-24 14:52:41 -04:00
efd0d1e051 Refactor ShowHabit fragment; break widgets 2016-06-24 08:39:48 -04:00
a11ad6e909 ShowHabit: Refactor score chart 2016-06-22 19:47:16 -04:00
a060cbe578 ShowHabit: Refactor subtitle and overview 2016-06-22 08:48:08 -04:00
a445ca962b Merge tag 'v1.5.6' into dev
v1.5.6
2016-06-19 17:10:17 -04:00
2b6fc06b86 Merge branch 'hotfix/1.5.6' 2016-06-19 17:10:12 -04:00
98ad3aab9d Make checkmark widgets work again 2016-06-19 17:06:03 -04:00
c7e63a40da Bump version to 1.5.6 2016-06-19 17:04:25 -04:00
b6ed33b1e6 Merge branch 'dev' into feature/refactoring-mvc 2016-06-19 16:16:04 -04:00
91e39372a1 Merge tag 'v1.5.5' into dev
v1.5.5
2016-06-19 10:08:26 -04:00
c2dd26eeb3 Merge branch 'hotfix/1.5.5' 2016-06-19 10:08:19 -04:00
5831340343 Update French translation; add Slovenian and Croatian translations 2016-06-19 09:57:45 -04:00
d7f6f52a49 Always refresh data after resuming
Fixes #120
2016-06-19 09:32:42 -04:00
93b442332d Bugfix: add check on correct date when checking from notification 2016-06-19 09:08:34 -04:00
e248824bcd Bump version to 1.5.5 2016-06-19 08:08:00 -04:00
ec4a381d70 Refactor Habit class 2016-06-17 07:29:48 -04:00
b13f2b4228 Create a class for Reminders 2016-06-16 15:19:02 -04:00
efc7b2cebb Replace ActiveAndroid queries with raw SQLite queries 2016-06-16 13:51:36 -04:00
add08d6054 Fix reordering 2016-06-15 10:12:33 -04:00
5d8a348aaf Hide empty message at startup 2016-06-15 09:54:39 -04:00
ec0e8ac24c Cancel selection with back button correctly 2016-06-15 09:48:01 -04:00
fee3137a6f Move ripple to correct place 2016-06-15 05:39:13 -04:00
abe6b10964 Restore dynamic checkmark button count 2016-06-15 05:32:20 -04:00
6484b96e5a Reformat and reorganize some code 2016-06-15 05:04:12 -04:00
3d3d5b9b96 Fix top navigation on Settings and About screens 2016-06-15 05:02:13 -04:00
14364901ff Reorganize instrumented tests 2016-06-14 05:46:31 -04:00
440706882b Move command tests to JVM 2016-06-14 05:30:30 -04:00
ca9d56e59e Fix toolbars 2016-06-12 18:22:04 -04:00
9a6dafaa79 Improve documentation 2016-06-12 09:23:55 -04:00
9a44774284 Add instrumented unit tests for SQLite lists 2016-06-12 07:55:47 -04:00
2b23b36e36 Move remaining model tests to JVM; simplify SQLite implementation 2016-06-10 18:55:32 -04:00
78d4f86cab Separate ActiveAndroid from models 2016-06-10 13:30:33 -04:00
18e8390aed Merge branch 'dev' into feature/refactoring-mvc 2016-06-05 04:37:46 -04:00
cabcd5b1bf CSV export: allow spaces on filename and fix tests 2016-06-04 22:06:01 -04:00
7e8a2a0c1c Major refactoring of ListHabitsActivity 2016-06-04 18:10:33 -04:00
650971bf36 Merge tag 'v1.5.4' into dev
Version 1.5.4
2016-05-29 12:06:46 -04:00
00774368d4 Merge branch 'hotfix/1.5.4' 2016-05-29 12:06:36 -04:00
cbf1bd3e19 Update changelog 2016-05-29 11:57:33 -04:00
4061921b93 Add Serbian translation 2016-05-29 11:56:57 -04:00
59d42fe62f Show empty ringtone name in case of RuntimeException
Fixes #116
2016-05-29 11:47:36 -04:00
3ffa079e24 Remove code duplication 2016-05-28 13:03:37 -04:00
bb950d61fc Move sendFile and sendEmail to Screen 2016-05-28 12:21:38 -04:00
0ad0e5cf36 Fix time out on tests 2016-05-28 12:20:02 -04:00
3b56d6d596 Add missing file 2016-05-28 10:16:21 -04:00
8d57273987 Refactor EditHabitDialog 2016-05-28 10:15:55 -04:00
b98853ab26 Introduce ButterKnife 2016-05-27 23:02:04 -04:00
071cad73d4 Make models observable, refactor ShowHabitFragment 2016-05-27 22:26:33 -04:00
16dc9c25d2 Fix bug that caused checkmarks not to update sometimes 2016-05-27 14:06:55 -04:00
6b23858136 Create HabitListView and move most code from Fragment to it 2016-05-27 12:19:29 -04:00
e0198e9926 Reorganize files 2016-05-27 10:20:16 -04:00
6445bf62bc Refactor MainActivity and Preferences 2016-05-26 16:35:47 -04:00
83ef8564e1 Reorganize file tree according to feature 2016-05-26 10:38:59 -04:00
88e8aad0d8 CSV export: sanitize habit name before creating folder
Fix #113
2016-05-25 10:09:39 -04:00
a4b6728721 Bump version to 1.5.4 2016-05-25 10:09:11 -04:00
e6e80b9841 Update sync protocol 2016-05-22 18:28:06 -04:00
442c3ed78d Merge branch 'dev' into feature/sync 2016-05-22 17:50:14 -04:00
ca9745f550 Merge tag 'v1.5.3' into dev
Version 1.5.3
2016-05-22 12:56:36 -04:00
33bc8f78e7 Merge branch 'hotfix/1.5.3' 2016-05-22 12:56:28 -04:00
0f223f8504 Update changelog 2016-05-22 12:56:15 -04:00
007996c69e Update translations 2016-05-22 12:50:42 -04:00
ff9d50b32a Remove debug code 2016-05-22 12:29:37 -04:00
38024d71ce Allow checkmark widget to be resized to very small sizes 2016-05-22 12:24:28 -04:00
9ec1afc208 Remove associated preference after deleting widget 2016-05-22 10:28:58 -04:00
e0888a9b4d Remove fields from BaseWidgetProvider
This caused a bug when multiple widgets had different sizes. The size of the
last widget would be used in all of them.
2016-05-22 10:27:27 -04:00
8aade2f145 Fix crash when habits with reminders have short names
Fixes #109
2016-05-22 09:33:30 -04:00
1ba1d775f7 Bump version to 1.5.3 2016-05-22 09:24:20 -04:00
605593d739 Update UI tests 2016-05-19 12:51:36 -04:00
bfbfcbd8cf Merge tag 'v1.5.2' into dev
Version 1.5.2
2016-05-19 12:01:37 -04:00
2399dccddc Emit JSON object instead of string 2016-05-19 10:35:44 -04:00
dd5f37290c Merge branch 'dev' into feature/sync 2016-05-17 10:58:53 -04:00
dbf569ff87 Merge tag 'v1.5.1' into dev
v1.5.1
2016-05-17 09:36:00 -04:00
5b402478e9 Use encrypted connection to server (TLS) 2016-05-16 22:29:10 -04:00
e3b7e9f60f Persist pending events to database 2016-05-16 08:20:08 -04:00
b0040bd83c Fetch commands since last sync 2016-05-15 09:06:25 -04:00
56e1268f85 Sync remaining commands 2016-05-15 09:06:25 -04:00
41d9e2f0f5 Sync archive/unarchive commands 2016-05-15 09:06:25 -04:00
1fcfb9b22e First version of sync feature 2016-05-15 09:06:25 -04:00
2c80544aaa Merge tag 'v1.5.0' into dev
Version 1.5.0
2016-05-15 08:43:39 -04:00
1188 changed files with 62091 additions and 22810 deletions

36
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,36 @@
---
name: Bug report
about: Report something broken in the app
title: ''
labels: ''
assignees: ''
---
<!--
Please use the template below for your bug report. Issues that do not follow this
template, or that do not contain all necessary information (namely, description of
the problem, steps to reproduce, phone, phone operating system, and app version)
will be closed without further consideration.
-->
## Pre-submission checklist
- [ ] I am submitting a bug report, not a feature request.
- [ ] I have searched for similar issues, but did not find any matches.
## Description
A clear and concise description of what the problem is.
## Steps to reproduce
1. Go to ...
2. Click on ....
3. Scroll down to ....
4. See error
## System information
- Phone: [e.g. Google Pixel 4]
- Phone Operating System: [e.g. Android 10]
- App version: [e.g. 2.0.2]
## Screenshots
If applicable, add screenshots to help explain your problem.

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Feature requests
url: https://github.com/iSoron/uhabits/discussions/categories/feature-requests?discussions_q=category%3A%22Feature+Requests%22+sort%3Atop
about: Submit ideas for new features and for improving existing features
- name: Help & FAQ
url: https://github.com/iSoron/uhabits/discussions/categories/help-faq
about: Ask questions about using the app or setting up the project

54
.gitignore vendored
View File

@@ -1,36 +1,20 @@
#built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
local.properties
# Windows thumbnail db
Thumbs.db
# OSX files
.DS_Store
# Eclipse project files
.classpath
.project
# Android Studio
.idea
#.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
.gradle
build/
*.iml
art/
*.actual.png
*.pbxuser
*.perspective
*.perspectivev3
*.swp
*~.nib
*.hprof
.DS_Store
._.DS_Store
.externalNativeBuild
.gradle
.idea
.secret
build
local.properties
node_modules
*xcuserdata*
*.sketch
crowdin.yml
kotlin-js-store

3
.gitmodules vendored
View File

@@ -1,3 +0,0 @@
[submodule "libs/drag-sort-listview"]
path = libs/drag-sort-listview
url = https://github.com/iSoron/drag-sort-listview.git

View File

@@ -1,95 +1,436 @@
# Changelog
### 1.5.2 (May 19, 2016)
## [2.3.1] -- 2025-08-13
* Fix missing attachment on bug reports
* Fix bug that prevents some widgets from rendering
* Complete Japanese translation
### Changed
### 1.5.1 (May 17, 2016)
- Add notes to exported CSV files (@iSoron)
* Fix build on F-Droid
### Fixed
### 1.5.0 (May 15, 2016)
- Prevent some views from being obscured by system UI (@iSoron, #2171)
- Disable confetti if animations are disabled globally (@iSoron, #2170)
- Make symbols easier to distinguish in "pure black" dark mode (powerjungle, #2136)
- Trim unit labels when necessary (@hiqua, @iSoron, #2158)
* Add night mode, with AMOLED support
* Backport material design to older devices
* Display more information on statistics screen
* Display score on main screen and checkmark widget
* Make widgets react immediately to touch
* Reschedule reminders after reboot
* Pick first day of the week according to country
* Add option to reverse order of days on main screen
* Add option to change notification sounds
* Add Catalan, Indonesian, Turkish, Ukrainian translations
* Switch between Simplified/Traditional Chinese according to country
## [2.3.0] -- 2025-06-23
### 1.4.1 (April 9, 2016)
### Added
* Show error message on widgets, instead of crashing
* Complete French translation
* Minor fixes to other translations
- Add support for Android 15 and 16 (@iSoron)
- Show confetti animation (@gokulk16, @iSoron, #1743)
- Show streaks for measurable habits (@teckwarz, #2059)
- Allow user to unset measurable habits (@leontodd, @kalina559, #1899, #2109)
### 1.4.0 (April 7, 2016)
### Changed
* Ability to import data from third-party apps
* Ability to save and restore full database backup
* Show more information on streak chart
* Simplify interface for creating habits
* Add link to Frequently Asked Questions (FAQ)
* Reduce app loading time and lag on widgets
* Generate bug reports on crash and from settings screen
* Disable vibration according to phone settings
* Add Czech translation
* Fix wrong month names for some languages
- Change background widget color for habits with implicit checks (@wobbba, #1915)
### 1.3.3 (March 20, 2016)
### Fixed
* Add Spanish and Korean translations
* Make small corrections to other translations
* Fix incorrect date in history calendar
- Fix notification when goal type is set to maximum (@manish99verma, #1931)
- Never mark "at most" habits as completed for the day (@kalina559, #2077)
- Increase minimum widget size (@iSoron, #2118)
- Improve Gradle configuration (@jimlyas, #2108)
### 1.3.2 (March 18, 2016)
## [2.2.0] -- 2024-01-30
* Add Arabic, Italian, Polish, Russian and Swedish translations
* Minor fixes to German and French translations
* Minor bug fixes
### Added
### 1.3.1 (March 15, 2016)
- Add support for Android 14 (@iSoron, @hiqua)
- Allow user to change app language (@leondzn)
* Fixes crash on devices with large screen, such as the Nexus 10
* Fixes crash when clicking widgets and reminders of deleted habits
* Other minor bug fixes
### Fixed
### 1.3.0 (March 12, 2016)
- Implement workaround to make notifications non-dismissible in Android 14 (@iSoron, #1872)
- Fix splash screen background color in dark mode (@SIKV, #1888)
* New frequency plot: view total repetitions per day of week
* New history editor: put checkmarks in the past
* Add German, French and Japanese translations
* Add about screen, with credits to all contributors
* Fix small bug that prevented habit from being reordered
* Fix small bug caused by rotating the device
## [2.1.3] -- 2023-08-28
### 1.2.0 (March 4, 2016)
### Fixed
* Ability to export habit data as CSV
* Widgets (checkmark, history, score and streaks)
* More natural scrolling on data views (fling)
* Minor UI improvements on pre-Lollipop devices
* Fix crash on Samsung Galaxy TabS 8.4
* Other minor bug fixes
- Use text input on Samsung devices (@iSoron, #1719)
- Prevent crash if alarm permission is revoked (@iSoron)
- Adjust widget colors (@iSoron)
- Fix bug preventing screens from updating at midnight (@iSoron)
- Fix skip button in locales that use comma instead of dot (@iSoron, #1721)
### 1.1.1 (February 24, 2016)
## [2.1.2] -- 2023-05-26
* Show reminder only on chosen days of the week
* Rearrange habits by long-pressing then dragging
* Select and modify multiple habits simultaneously
* 12/24 hour format according to phone preferences
* Permanently delete habits
* Usage hints during startup
* Translation to Brazilian Portuguese and Chinese
* Other minor fixes
### Fixed
### 1.0.0 (February 19, 2016)
- Fix bug that caused widget to enter checkmark on wrong date (@iSoron, #1541)
- Fix widget corners on Android 12 (@iSoron)
- Fix bug that caused notes to be lost when editing a checkmark (@iSoron, #1566)
- Prevent soft keyboard from covering entry popup (@iSoron)
- Accept comma (instead of dot) in certain locales (@iSoron)
* Initial release
### Changed
- Remove update delay after entering a checkmark (@iSoron)
### Removed
- Remove stack widgets (@iSoron)
## [2.1.1] -- 2022-09-24
### Fixed
- Fix Tasker plugin (@iSoron, #1503)
## [2.1.0] -- 2022-09-10
### Added
- Allow user to add notes to specific dates (@vbh, #1103)
- Allow user to track "at most" numerical habits (@KristianTashkov, #1101)
- Allow user to add skips to measurable habits (@kalina559, #1319)
- Bring back custom frequencies (x times in y days) (@hiqua, #1079)
- Improve number picker (@hiqua, @iSoron, #1082, #1370)
- Add new checkmark and number picker (@iSoron, #1370)
- Allow user to import numerical habits from HabitBull (@hiqua, #1278)
- Add support for Android 13 themed icons (@cheeeeer, #1497)
### Removed
- Hide snooze button Android 12 notifications (@hiqua, #1226)
- Remove preference to set LED lights (@iSoron)
### Changed
- Hide failed habits along with completed ones (@hiqua, #1052)
- Cycle through all checkmark states when toggling (@iSoron)
- Add delay after toggling a habit (@hiqua, @kalina559, #1147)
- Small theme improvements (@KristianTashkov, #1113)
- Left-align habit notes (@iSoron)
- Increase target SDK to 31 (@hiqua)
### Fixed
- Fix small dialog buttons (@kalina559, #1096)
- Fix invalid CSV files (@hiqua, #1177)
- Fix small issues in calendar chart (@kalina559, #1314)
- Resort habit list after edit (@hiqua, #1350)
- Fix marker scaling in frequency display (@eduebernal, #1425)
- Fix widgets not working correctly on API 33 (@iSoron, #1488)
### Refactoring & Testing
- Replace raster icons by vector assets (@kalina559)
- Remove JVM dependencies from uhabits-core module (@sgallese)
- Add various missing tests (@sgallese)
- Upgrade project dependencies (@hiqua, @sgallese)
## [2.0.3] - 2021-08-21
### Fixed
- Improve automatic checkmarks for monthly habits (@iSoron, #947)
- Fix small theme issues (@iSoron)
- Fix ANR on some Samsung phones (@iSoron, #962)
- Fix dates before the year 2000 (@iSoron, #967)
- Fix notification adding checkmarks to the wrong day (@hiqua, #969)
- Fix crashes in widgets (@hiqua, @iSoron, #907, #966, #965)
- Fix crash when moving habits (@hiqua, #968)
## [2.0.2] - 2021-05-23
### Changed
- Make checkmark widget resizable
### Fixed
- Fix crash caused by numerical habits with zero target (@iSoron, #903)
- Fix small issues with font size (@iSoron)
- Allow fractional target values (@sumanabhi, #911)
- Fix IllegalStateException in androidx.customview.view (@iSoron, #906)
- Fix crash when selecting habit frequency in some languages (@iSoron, #926)
- Fix IllegalArgumentException in RingView (@iSoron, #904)
## [2.0.1] - 2021-05-09
### Added
- Make midnight delay optional and disabled by default (@hiqua)
- Add arrows to sort menu (@iSoron)
### Removed
- Temporarily remove experimental device sync functionality. This feature will be re-added in
Loop 2.1.
### Changed
- Make implicit checkmarks easier to read (@iSoron)
- Update and improve list of translators (@hiqua, @iSoron)
### Fixed
- Disable transparency for stacked widgets (@hiqua)
- Fix various color issues on the dark theme (@hiqua, @iSoron)
- Fix "customize notifications" on older devices (@hiqua)
- Fix snooze button in notifications when device is locked (@hiqua)
- Fix a crash when deleting habits (@engineering4good)
- Fix checkmark widget not rendering properly on some Samsung phones (@iSoron)
### Refactoring & Testing
- Finish conversion of the entire project to Kotlin (@hiqua, @iSoron, @MarKco)
- Automatically run large tests on GitHub Actions (@iSoron)
- Remove unused v21 resources (@hiqua)
## [2.0.0-alpha] - 2020-11-29
### Added
- Track numeric habits (@iSoron, @namnl)
- Skip days without breaking streak (@KristianTashkov)
- Sort habits by status (@hiqua)
- Sort habits in reverse order (@iSoron)
- Add notes to habits (@recheej)
- Improve readibility of charts (@chennemann)
- Delay new day until 3am (@KristianTashkov)
- Export backups daily (@iSoron)
### Removed
- Drop support to devices older than Android 6.0 (API 23)
### Fixed
- Reset chart offset when switching scale (@alxmjo)
- Don't show reminders from archived habits (@KristianTashkov)
- Lapses on non-daily habits decrease the score too much (@iSoron)
- Update widgets at midnight (@KristianTashkov)
### Refactoring
- Convert files to Kotlin (@olegivo)
## [1.8.12] - 2021-01-30
- Fix bug that caused incorrect check marks to show after scrolling (#713)
- Fix issue preventing widgets from updating at midnight (#680)
## [1.8.11] - 2020-12-29
- Fix theme issues on Xiaomi phones
## [1.8.10] - 2020-11-26
- Update translations
## [1.8.9] - 2020-11-18
- Manage exceptions when activities don't exist to handle intents (#181)
- MemoryHabitList: Inherit parent's order (#598)
- Remove notification groups; revert to default system behavior
- Remove SyncManager and Internet permission
## [1.8.8] - 2020-06-21
- Make small changes to the habit scheduling algorithm, so that "1 time every x days" habits work
more predictably.
- Fix crash when saving habit
## [1.8.0] - 2020-01-01
- New bar chart showing number of repetitions performed in each week, month, quarter or year.
- Improved calculation of streaks for non-daily habits: performing habits on irregular weekdays will
no longer break your streak.
- Many more colors to choose from (now 20 in total).
- Ability to customize how transparent the widgets are on your home screen.
- Ability to customize the first day of the week.
- Yes/No buttons on notifications, instead of just "Check".
- Automatic dark theme according to phone settings (Android 10).
- Smaller APK and backup files.
- Many other internal code changes improving performance and stability.
## [1.7.11] - 2019-08-10
- Fix bug that produced corrupted CSV files in some countries
## [1.7.10] - 2019-06-15
- Fix bug that prevented some devices from showing notifications.
- Update targetSdk to Android Pie (API level 28)
## [1.7.8] - 2018-04-21
- Add support for adaptive icons (Oreo)
- Add support for notification channels (Oreo)
- Update translations
## [1.7.7] - 2017-09-30
- Fix bug that caused reminders to show repeatedly on DST changes
## [1.7.6] - 2017-07-18
- Fix bug that caused widgets not to render sometimes
- Fix other minor bugs
- Update translations
## [1.7.3] - 2017-05-30
- Improve performance of 'sort by score'
- Other minor bug fixes
## [1.7.2] - 2017-05-27
- Fix crash at startup
## [1.7.1] - 2017-05-21
- Fix crash (BadParcelableException)
- Fix layout for RTL languages such as Arabic
- Automatically detect and reject invalid database files
- Add Hebrew translation
## [1.7.0] - 2017-03-31
- Sort habits automatically
- Allow swiping the header to see previous days
- Import backups directly from Google Drive or Dropbox
- Refresh data automatically at midnight
- Other minor bug fixes and enhancements
## [1.6.2] - 2016-10-13
- Fix crash on Android 4.1
## [1.6.1] - 2016-10-10
- Fix a crash at startup when database is corrupted
## [1.6.0] - 2016-10-10
- Add option to make notifications sticky
- Add option to hide completed habits
- Display total number of repetitions for each habit
- Pebble integration: check/snooze habits from the watch
- Tasker/Locale integration: allow third-party apps to add checkmarks
- Export an unified CSV file, with checkmarks for all the habits
- Increase width of name column according to screen size
- Stop showing reminders for archived habits
- Add Danish, Dutch, Greek, Hindi and Portuguese (PT) translations
- Other minor fixes and enhancements
## [1.5.6] - 2016-06-19
- Fix bug that prevented checkmark widget from working
## [1.5.5] - 2016-06-19
- Fix bug that prevented check button on notification to work sometimes
- Fix bug that caused back button to apparently erase some checkmarks
- Complete French translation
- Add Croatian and Slovenian translations
## [1.5.4] - 2016-05-29
- Fix crash upon opening settings screen in some phones
- Fix missing folders in CSV archive
- Add Serbian translation
## [1.5.3] - 2016-05-22
- Complete Arabic and Czech translations
- Fix crash at startup
- Fix checkmark widget on custom launchers
## [1.5.2] - 2016-05-19
- Fix missing attachment on bug reports
- Fix bug that prevents some widgets from rendering
- Complete Japanese translation
## [1.5.1] - 2016-05-17
- Fix build on F-Droid
## [1.5.0] - 2016-05-15
- Add night mode, with AMOLED support
- Backport material design to older devices
- Display more information on statistics screen
- Display score on main screen and checkmark widget
- Make widgets react immediately to touch
- Reschedule reminders after reboot
- Pick first day of the week according to country
- Add option to reverse order of days on main screen
- Add option to change notification sounds
- Add Catalan, Indonesian, Turkish, Ukrainian translations
- Switch between Simplified/Traditional Chinese according to country
## [1.4.1] - 2016-04-09
- Show error message on widgets, instead of crashing
- Complete French translation
- Minor fixes to other translations
## [1.4.0] - 2016-04-07
- Ability to import data from third-party apps
- Ability to save and restore full database backup
- Show more information on streak chart
- Simplify interface for creating habits
- Add link to Frequently Asked Questions (FAQ)
- Reduce app loading time and lag on widgets
- Generate bug reports on crash and from settings screen
- Disable vibration according to phone settings
- Add Czech translation
- Fix wrong month names for some languages
## [1.3.3] - 2016-03-20
- Add Spanish and Korean translations
- Make small corrections to other translations
- Fix incorrect date in history calendar
## [1.3.2] - 2016-03-18
- Add Arabic, Italian, Polish, Russian and Swedish translations
- Minor fixes to German and French translations
- Minor bug fixes
## [1.3.1] - 2016-03-15
- Fixes crash on devices with large screen, such as the Nexus 10
- Fixes crash when clicking widgets and reminders of deleted habits
- Other minor bug fixes
## [1.3.0] - 2016-03-12
- New frequency plot: view total repetitions per day of week
- New history editor: put checkmarks in the past
- Add German, French and Japanese translations
- Add about screen, with credits to all contributors
- Fix small bug that prevented habit from being reordered
- Fix small bug caused by rotating the device
## [1.2.0] - 2016-03-04
- Ability to export habit data as CSV
- Widgets (checkmark, history, score and streaks)
- More natural scrolling on data views (fling)
- Minor UI improvements on pre-Lollipop devices
- Fix crash on Samsung Galaxy TabS 8.4
- Other minor bug fixes
## [1.1.1] - 2016-02-24
- Show reminder only on chosen days of the week
- Rearrange habits by long-pressing then dragging
- Select and modify multiple habits simultaneously
- 12/24 hour format according to phone preferences
- Permanently delete habits
- Usage hints during startup
- Translation to Brazilian Portuguese and Chinese
- Other minor fixes
## [1.0.0] - 2016-02-19
- Initial release

151
NOTICE.md
View File

@@ -1,6 +1,6 @@
# Copyright Notices
### ActiveAndroid
## ActiveAndroid
<https://github.com/pardom/ActiveAndroid>
@@ -18,7 +18,7 @@
See the License for the specific language governing permissions and
limitations under the License.
### Android Open Source Project
## Android Open Source Project
<https://source.android.com/>
@@ -36,7 +36,7 @@
See the License for the specific language governing permissions and
limitations under the License.
### FontAwesome
## FontAwesome
<http://fontawesome.io>
@@ -59,29 +59,7 @@ under the SIL OFL 1.1.
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
### DragSortListView
<https://github.com/bauerca/drag-sort-listview>
A subclass of the Android ListView component that enables drag
and drop re-ordering of list items.
Copyright 2012 Carl Bauer
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
### Material Design Icons
## Material Design Icons
<https://github.com/google/material-design-icons>
@@ -89,7 +67,7 @@ Material design icons are the official icon set from Google that are designed
under the material design guidelines. Available under the Creative Common
Attribution 4.0 International License (CC-BY 4.0).
### Android Flow Layout
## Android Flow Layout
<https://github.com/ApmeM/android-flowlayout>
@@ -108,3 +86,122 @@ Extended linear layout that wrap its content when there is no place in the curre
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
## Dagger 2
<https://github.com/google/dagger>
A fast dependency injector for Android and Java.
Copyright 2012 Square, Inc.
Copyright 2012 Google, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
## AutoFactory
<https://github.com/google/auto/tree/master/factory>
A source code generator for JSR-330-compatible factories.
Copyright 2013 Google, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
## Retrolambda
<https://github.com/orfjackal/retrolambda>
Backport of Java 8's lambda expressions to Java 7, 6 and 5
Copyright (c) 2013-2016 Esko Luontola and other Retrolambda contributors
This software is released under the Apache License 2.0.
The license text is at http://www.apache.org/licenses/LICENSE-2.0
## PebbleKit SDK
<https://github.com/pebble/pebble-android-sdk/>
Android PebbleKit SDK to talk to the Pebble via Bluetooth
The MIT License (MIT)
Copyright (c) 2014 - 2015 Pebble Technology
## AppIntro
<https://github.com/PaoloRotolo/AppIntro>
Make a cool intro for your Android app.
Copyright 2015 Paolo Rotolo
Copyright 2016 Maximilian Narr
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
## ButterKnife
<https://github.com/JakeWharton/butterknife>
Bind Android views and callbacks to fields and methods
Copyright 2013 Jake Wharton
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
## opencsv
<http://opencsv.sourceforge.net/>
Opencsv is a very simple csv (comma-separated values) parser library for Java.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

132
README.md
View File

@@ -1,52 +1,23 @@
# Loop Habit Tracker
<a href="https://circleci.com/gh/iSoron/uhabits/tree/dev">
<img src="https://img.shields.io/circleci/project/iSoron/uhabits/dev.svg">
<h1 align="center">Loop Habit Tracker</h1>
<p align="center">
<a href="https://github.com/iSoron/uhabits/releases/latest">
<img alt="release" src="https://img.shields.io/github/v/release/iSoron/uhabits" />
</a>
<a href="https://codecov.io/github/iSoron/uhabits?branch=dev">
<img src="https://img.shields.io/codecov/c/github/iSoron/uhabits.svg" alt="Coverage via Codecov" />
<a href="https://github.com/iSoron/uhabits/discussions">
<img alt="GitHub" src="https://img.shields.io/badge/GitHub-Discussions-%23fc4ebc" />
</a>
</p>
Loop is a simple Android app that helps you create and maintain good habits,
Loop is a mobile app that helps you create and maintain good habits,
allowing you to achieve your long-term goals. Detailed graphs and statistics
show you how your habits improved over time. It is completely ad-free and open
source.
<p align="center">
<a href="https://play.google.com/store/apps/details?id=org.isoron.uhabits&utm_source=global_co&utm_medium=prtnr&utm_content=Mar2515&utm_campaign=PartBadge&pcampaignid=MKT-AC-global-none-all-co-pr-py-PartBadges-Oct1515-1"><img alt="Get it on Google Play" src="https://play.google.com/intl/en_us/badges/images/apps/en-play-badge-border.png" height="75px"/></a>
<a href="http://f-droid.org/app/org.isoron.uhabits"><img alt="Git if on F-Droid" src="http://i.imgur.com/baSPE7X.png" height="75px"/></a>
<a href="https://play.google.com/store/apps/details?id=org.isoron.uhabits&utm_source=global_co&utm_medium=prtnr&utm_content=Mar2515&utm_campaign=PartBadge&pcampaignid=MKT-AC-global-none-all-co-pr-py-PartBadges-Oct1515-1"><img alt="Get it on Google Play" src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" height="80px"/></a>
<a href="https://f-droid.org/app/org.isoron.uhabits"><img alt="Get it on F-Droid" src="https://f-droid.org/badge/get-it-on.png" height="80px"/></a>
</p>
## Features
* **Simple, beautiful and modern interface.** Loop has a minimalistic interface
that is easy to use and follows the material design guidelines.
* **Habit score.** In addition to showing your current streak, Loop has an
advanced algorithm for calculating the strength of your habits. Every
repetition makes your habit stronger, and every missed day makes it weaker. A
few missed days after a long streak, however, will not completely destroy
your entire progress.
* **Detailed graphs and statistics.** Clearly see how your habits improved over
time with beautiful and detailed graphs. Scroll back to see the complete
history of your habits.
* **Flexible schedules.** Supports both daily habits and habits with more
complex schedules, such as 3 times every week; one time every other week; or
every other day.
* **Reminders.** Create an individual reminder for each habit, at a chosen hour
of the day. Easily check, dismiss or snooze your habit directly from the
notification, without opening the app.
* **Optimized for smartwatches.** Reminders can be checked, snoozed or
dismissed directly from your Android Wear watch.
* **Completely ad-free and open source.** There are absolutely no
advertisements, annoying notifications or intrusive permissions in this app,
and there will never be. The complete source code is available under the
GPLv3.
## Screenshots
[![Main screen][screen1th]][screen1]
@@ -56,12 +27,32 @@ source.
[![Widgets][screen5th]][screen5]
[![Night mode][screen6th]][screen6]
## Features
* **Beautiful, minimalistic and lightweight interface.** Loop has an elegant and minimalistic interface that is very easy to use, even for first-time users. Highly optimized for speed, the app works well even on older phones.
* **Habit score.** Loop has an advanced formula for calculating the strength of your habits. Every repetition makes your habit stronger and every missed day makes it weaker. A few missed days after a long streak, however, will not completely destroy your progress, unlike many other don't-break-the-chain apps.
* **Flexible schedules.** In addition to daily habits, Loop supports habits with more complex schedules, such as 3 times per week or every other day.
* **Reminders.** Schedule notifications to remind you of your habits. Each habit can have its own reminder, at a chosen time of the day. Easily check or dismiss your habit directly from the notification.
* **Widgets.** Be reminded of your habits whenever you unlock your phone. Colorful widgets allow you to track your habits directly from your home screen, without even opening the app.
* **Take control of your data.** If you want to further analyze your data, or move it to another service, Loop allows you to export it to spreadsheets (CSV) or to a database file (SQLite). For power users, checkmarks can be added through other apps, such as Tasker.
* **No limitations.** Track as many habits as you wish. Loop imposes no artificial limits on how many habits you can have. All features are available to all users. There are no in-app purchases.
* **Completely ad-free and open source.** There are no advertisements, annoying notifications or intrusive permissions in this app, and there will never be. The app is completely open-source (GPLv3).
* **Works offline and respects your privacy.** Loop doesn't require an Internet connection or online account registration. Your confidential data is never sent to anyone. Neither the developers nor any third-parties have access to it.
## Installing
The easiest way to install Loop is through the [Google Play Store][playstore] or [F-Droid][fdroid].
You may also download and install the APK from the [releases page][releases];
note, however, that the app will not be updated automatically. To build this
app from the source code, see [building instructions][build].
app from the source code, see [build instructions][build].
## Contributing
@@ -71,8 +62,10 @@ contribute, even if you are not a software developer.
* **Report bugs, suggest features.** The easiest way to contribute is to simply
use the app and let us know if you find any problems or have any suggestions
to improve it. You can either use the link inside the app, or open an issue
at GitHub. If you would like to receive the newest versions of the app
to improve it. To report a problem, please [create a new bug report](https://github.com/iSoron/uhabits/issues/new/choose).
To request a new feature or vote on existing feature requests, please visit
our [GitHub Discussions page](https://github.com/iSoron/uhabits/discussions/categories/feature-requests).
If you would like to receive the newest versions of the app
earlier than everyone else, [join our open beta on Google Play][beta].
* **Spread the word.** If you like the app, share it with your family, friends
@@ -81,43 +74,46 @@ contribute, even if you are not a software developer.
* **Translate the app into your own language.** If you are not a native English
speaker, and would like to see the app translated into your own language,
please join our [open translation project at POEditor][poedit]. If the translation
please join our [open translation project][poedit]. If the translation
is already completed, you are also very welcome to join and proofread it.
* **Write some code.** If you are an Android developer, you are very welcome to
contribute with code. Please, see the [developer guidelines][dev-guide] for more details.
contribute with code. Please see the [guidelines](https://github.com/iSoron/uhabits/blob/dev/docs/GUIDELINES.md).
## License
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option)
any later version.
<img align="right" alt="GPL v3" src="https://www.gnu.org/graphics/gplv3-88x31.png">
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
Copyright (C) 2016-2025 Álinson Santos Xavier <isoron@gmail.com>
Loop Habit Tracker is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
Loop Habit Tracker is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
with this program. If not, see <https://www.gnu.org/licenses/>.
[screen1]: screenshots/original/uhabits1.png
[screen2]: screenshots/original/uhabits2.png
[screen3]: screenshots/original/uhabits3.png
[screen4]: screenshots/original/uhabits4.png
[screen5]: screenshots/original/uhabits5.png
[screen6]: screenshots/original/uhabits6.png
[screen1th]: screenshots/thumbs/uhabits1.png
[screen2th]: screenshots/thumbs/uhabits2.png
[screen3th]: screenshots/thumbs/uhabits3.png
[screen4th]: screenshots/thumbs/uhabits4.png
[screen5th]: screenshots/thumbs/uhabits5.png
[screen6th]: screenshots/thumbs/uhabits6.png
[poedit]: https://poeditor.com/join/project/8DWX5pfjS0
[screen1]: screenshots/1.png
[screen2]: screenshots/2.png
[screen3]: screenshots/3.png
[screen4]: screenshots/4.png
[screen5]: screenshots/5.png
[screen6]: screenshots/6.png
[screen1th]: screenshots/1.thumb.png
[screen2th]: screenshots/2.thumb.png
[screen3th]: screenshots/3.thumb.png
[screen4th]: screenshots/4.thumb.png
[screen5th]: screenshots/5.thumb.png
[screen6th]: screenshots/6.thumb.png
[poedit]: https://translate.loophabits.org
[playstore]: https://play.google.com/store/apps/details?id=org.isoron.uhabits
[releases]: https://github.com/iSoron/uhabits/releases
[fdroid]: http://f-droid.org/app/org.isoron.uhabits
[dev-guide]: https://github.com/iSoron/uhabits/wiki/Developer-guidelines
[build]: https://github.com/iSoron/uhabits/wiki/Developer-guidelines#building
[fdroid]: https://f-droid.org/app/org.isoron.uhabits
[build]: https://github.com/iSoron/uhabits/blob/dev/docs/BUILD.md
[beta]: https://play.google.com/apps/testing/org.isoron.uhabits

View File

@@ -1,72 +0,0 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "org.isoron.uhabits"
minSdkVersion 15
targetSdkVersion 23
buildConfigField "Integer", "databaseVersion", "14"
buildConfigField "String", "databaseFilename", "\"uhabits.db\""
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
//testInstrumentationRunnerArgument "size", "small"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
debug {
testCoverageEnabled = true
}
}
lintOptions {
checkReleaseBuilds false
}
}
dependencies {
compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:preference-v14:23.3.0'
compile 'com.github.paolorotolo:appintro:3.4.0'
compile 'org.apmem.tools:layouts:1.10@aar'
compile 'com.opencsv:opencsv:3.7'
compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
compile project(':libs:drag-sort-listview:library')
androidTestCompile 'com.android.support:support-annotations:23.3.0'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.1') {
exclude group: 'com.android.support'
}
androidTestCompile('com.android.support.test.espresso:espresso-intents:2.2.1') {
exclude group: 'com.android.support'
}
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.1') {
exclude group: 'com.android.support'
}
}
task grantAnimationPermission(type: Exec, dependsOn: 'installDebug') {
commandLine "adb shell pm grant org.isoron.uhabits android.permission.SET_ANIMATION_SCALE".split(' ')
}
tasks.whenTaskAdded { task ->
if (task.name.startsWith('connected')) {
task.dependsOn grantAnimationPermission
}
}

View File

@@ -1,3 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<lint>
</lint>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

View File

@@ -1,5 +0,0 @@
#!/bin/bash
P=/sdcard/Android/data/org.isoron.uhabits/cache/Failed/
adb pull $P Failed/
adb shell rm -r $P

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,68 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits;
import android.content.Context;
import android.os.Build;
import android.os.Looper;
import android.support.test.InstrumentationRegistry;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.helpers.UIHelper;
import org.isoron.uhabits.tasks.BaseTask;
import org.junit.Before;
import java.util.concurrent.TimeoutException;
public class BaseTest
{
protected Context testContext;
protected Context targetContext;
private static boolean isLooperPrepared;
public static final long FIXED_LOCAL_TIME = 1422172800000L; // 8:00am, January 25th, 2015 (UTC)
@Before
public void setup()
{
if(!isLooperPrepared)
{
Looper.prepare();
isLooperPrepared = true;
}
targetContext = InstrumentationRegistry.getTargetContext();
testContext = InstrumentationRegistry.getContext();
UIHelper.setFixedTheme(R.style.AppBaseTheme);
DateHelper.setFixedLocalTime(FIXED_LOCAL_TIME);
}
protected void waitForAsyncTasks() throws InterruptedException, TimeoutException
{
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN)
{
Thread.sleep(1000);
return;
}
BaseTask.waitForTasks(10000);
}
}

View File

@@ -1,100 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.ui;
import android.preference.Preference;
import android.view.View;
import android.widget.Adapter;
import android.widget.AdapterView;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
import org.isoron.uhabits.models.Habit;
public class HabitMatchers
{
public static Matcher<Habit> withName(final String name)
{
return new TypeSafeMatcher<Habit>()
{
@Override
public boolean matchesSafely(Habit habit)
{
return habit.name.equals(name);
}
@Override
public void describeTo(Description description)
{
description.appendText("name should be ").appendText(name);
}
@Override
public void describeMismatchSafely(Habit habit, Description description)
{
description.appendText("was ").appendText(habit.name);
}
};
}
public static Matcher<View> containsHabit(final Matcher<Habit> matcher)
{
return new TypeSafeMatcher<View>()
{
@Override
protected boolean matchesSafely(View view)
{
Adapter adapter = ((AdapterView) view).getAdapter();
for (int i = 0; i < adapter.getCount(); i++)
if (matcher.matches(adapter.getItem(i))) return true;
return false;
}
@Override
public void describeTo(Description description)
{
description.appendText("with class name: ");
matcher.describeTo(description);
}
};
}
public static Matcher<?> isPreferenceWithText(final String text)
{
return (Matcher<?>) new BaseMatcher()
{
@Override
public boolean matches(Object o)
{
if(!(o instanceof Preference)) return false;
return o.toString().contains(text);
}
@Override
public void describeTo(Description description)
{
description.appendText(String.format("is preference with text '%s'", text));
}
};
}
}

View File

@@ -1,131 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.ui;
import android.support.test.espresso.UiController;
import android.support.test.espresso.ViewAction;
import android.support.test.espresso.action.CoordinatesProvider;
import android.support.test.espresso.action.GeneralClickAction;
import android.support.test.espresso.action.GeneralLocation;
import android.support.test.espresso.action.Press;
import android.support.test.espresso.action.Tap;
import android.support.test.espresso.matcher.ViewMatchers;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import org.hamcrest.Matcher;
import org.isoron.uhabits.R;
import java.security.InvalidParameterException;
import java.util.Random;
public class HabitViewActions
{
public static ViewAction toggleAllCheckmarks()
{
final GeneralClickAction clickAction =
new GeneralClickAction(Tap.LONG, GeneralLocation.CENTER, Press.FINGER);
return new ViewAction()
{
@Override
public Matcher<View> getConstraints()
{
return ViewMatchers.isDisplayed();
}
@Override
public String getDescription()
{
return "toggleAllCheckmarks";
}
@Override
public void perform(UiController uiController, View view)
{
if (view.getId() != R.id.llButtons)
throw new InvalidParameterException("View must have id llButtons");
LinearLayout llButtons = (LinearLayout) view;
int count = llButtons.getChildCount();
for (int i = 0; i < count; i++)
{
TextView tvButton = (TextView) llButtons.getChildAt(i);
clickAction.perform(uiController, tvButton);
}
}
};
}
public static ViewAction clickAt(final int x, final int y)
{
return new GeneralClickAction(Tap.SINGLE, new CoordinatesProvider()
{
@Override
public float[] calculateCoordinates(View view)
{
int[] locations = new int[2];
view.getLocationOnScreen(locations);
final float locationX = locations[0] + x;
final float locationY = locations[1] + y;
return new float[]{locationX, locationY};
}
}, Press.FINGER);
}
public static ViewAction clickAtRandomLocations(final int count)
{
return new ViewAction()
{
@Override
public Matcher<View> getConstraints()
{
return ViewMatchers.isDisplayed();
}
@Override
public String getDescription()
{
return "clickAtRandomLocations";
}
@Override
public void perform(UiController uiController, View view)
{
int width = view.getWidth();
int height = view.getHeight();
Random random = new Random();
for(int i = 0; i < count; i++)
{
int x = random.nextInt(width);
int y = random.nextInt(height);
ViewAction action = clickAt(x, y);
action.perform(uiController, view);
}
}
};
}
}

View File

@@ -1,225 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.ui;
import android.support.test.espresso.NoMatchingViewException;
import android.support.test.espresso.contrib.RecyclerViewActions;
import org.isoron.uhabits.R;
import org.isoron.uhabits.models.Habit;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
import static android.support.test.espresso.Espresso.onData;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.Espresso.pressBack;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.action.ViewActions.longClick;
import static android.support.test.espresso.action.ViewActions.replaceText;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.RootMatchers.isPlatformPopup;
import static android.support.test.espresso.matcher.ViewMatchers.Visibility.VISIBLE;
import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withClassName;
import static android.support.test.espresso.matcher.ViewMatchers.withContentDescription;
import static android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withParent;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.startsWith;
import static org.isoron.uhabits.ui.HabitMatchers.containsHabit;
import static org.isoron.uhabits.ui.HabitMatchers.withName;
public class MainActivityActions
{
public static String addHabit()
{
return addHabit(false);
}
public static String addHabit(boolean openDialogs)
{
String name = "New Habit " + new Random().nextInt(1000000);
String description = "Did you perform your new habit today?";
String num = "4";
String den = "8";
onView(withId(R.id.action_add))
.perform(click());
typeHabitData(name, description, num, den);
if(openDialogs)
{
onView(withId(R.id.buttonPickColor))
.perform(click());
pressBack();
onView(withId(R.id.inputReminderTime))
.perform(click());
onView(withText("Done"))
.perform(click());
onView(withId(R.id.inputReminderDays))
.perform(click());
onView(withText("OK"))
.perform(click());
}
onView(withId(R.id.buttonSave))
.perform(click());
onData(allOf(is(instanceOf(Habit.class)), withName(name)))
.onChildView(withId(R.id.label));
return name;
}
public static void typeHabitData(String name, String description, String num, String den)
{
onView(withId(R.id.input_name))
.perform(replaceText(name));
onView(withId(R.id.input_description))
.perform(replaceText(description));
try
{
onView(allOf(withId(R.id.sFrequency), withEffectiveVisibility(VISIBLE)))
.perform(click());
onData(allOf(instanceOf(String.class), startsWith("Custom")))
.inRoot(isPlatformPopup())
.perform(click());
}
catch(NoMatchingViewException e)
{
// ignored
}
onView(withId(R.id.input_freq_num))
.perform(replaceText(num));
onView(withId(R.id.input_freq_den))
.perform(replaceText(den));
}
public static void selectHabit(String name)
{
selectHabits(Collections.singletonList(name));
}
public static void selectHabits(List<String> names)
{
boolean first = true;
for(String name : names)
{
onData(allOf(is(instanceOf(Habit.class)), withName(name)))
.onChildView(withId(R.id.label))
.perform(first ? longClick() : click());
first = false;
}
}
public static void assertHabitsDontExist(List<String> names)
{
for(String name : names)
onView(withId(R.id.listView))
.check(matches(not(containsHabit(withName(name)))));
}
public static void assertHabitExists(String name)
{
List<String> names = new LinkedList<>();
names.add(name);
assertHabitsExist(names);
}
public static void assertHabitsExist(List<String> names)
{
for(String name : names)
onData(allOf(is(instanceOf(Habit.class)), withName(name)))
.check(matches(isDisplayed()));
}
public static void deleteHabit(String name)
{
deleteHabits(Collections.singletonList(name));
}
public static void deleteHabits(List<String> names)
{
selectHabits(names);
clickMenuItem(R.string.delete);
onView(withText("OK"))
.perform(click());
assertHabitsDontExist(names);
}
public static void clickMenuItem(int stringId)
{
try
{
onView(withText(stringId)).perform(click());
}
catch (Exception e1)
{
try
{
onView(withContentDescription(stringId)).perform(click());
}
catch(Exception e2)
{
clickHiddenMenuItem(stringId);
}
}
}
private static void clickHiddenMenuItem(int stringId)
{
try
{
// Try the ActionMode overflow menu first
onView(allOf(withContentDescription("More options"), withParent(withParent(
withClassName(containsString("Action")))))).perform(click());
}
catch (Exception e1)
{
// Try the toolbar overflow menu
onView(allOf(withContentDescription("More options"), withParent(withParent(
withClassName(containsString("Toolbar")))))).perform(click());
}
onView(withText(stringId)).perform(click());
}
public static void clickSettingsItem(String text)
{
onView(withClassName(containsString("RecyclerView")))
.perform(RecyclerViewActions.actionOnItem(
hasDescendant(withText(containsString(text))),
click()));
}
}

View File

@@ -1,346 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.ui;
import android.app.Activity;
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
import android.support.test.InstrumentationRegistry;
import android.support.test.espresso.NoMatchingViewException;
import android.support.test.espresso.intent.rule.IntentsTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.LargeTest;
import org.isoron.uhabits.MainActivity;
import org.isoron.uhabits.R;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.models.Habit;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
import static android.support.test.espresso.Espresso.onData;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.Espresso.pressBack;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.action.ViewActions.longClick;
import static android.support.test.espresso.action.ViewActions.scrollTo;
import static android.support.test.espresso.action.ViewActions.swipeLeft;
import static android.support.test.espresso.action.ViewActions.swipeRight;
import static android.support.test.espresso.action.ViewActions.swipeUp;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.intent.Intents.intended;
import static android.support.test.espresso.intent.Intents.intending;
import static android.support.test.espresso.intent.matcher.IntentMatchers.hasAction;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.isRoot;
import static android.support.test.espresso.matcher.ViewMatchers.withClassName;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.endsWith;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.startsWith;
import static org.isoron.uhabits.ui.HabitMatchers.withName;
import static org.isoron.uhabits.ui.HabitViewActions.clickAtRandomLocations;
import static org.isoron.uhabits.ui.HabitViewActions.toggleAllCheckmarks;
import static org.isoron.uhabits.ui.MainActivityActions.addHabit;
import static org.isoron.uhabits.ui.MainActivityActions.assertHabitExists;
import static org.isoron.uhabits.ui.MainActivityActions.assertHabitsDontExist;
import static org.isoron.uhabits.ui.MainActivityActions.assertHabitsExist;
import static org.isoron.uhabits.ui.MainActivityActions.clickMenuItem;
import static org.isoron.uhabits.ui.MainActivityActions.clickSettingsItem;
import static org.isoron.uhabits.ui.MainActivityActions.deleteHabit;
import static org.isoron.uhabits.ui.MainActivityActions.deleteHabits;
import static org.isoron.uhabits.ui.MainActivityActions.selectHabit;
import static org.isoron.uhabits.ui.MainActivityActions.selectHabits;
import static org.isoron.uhabits.ui.MainActivityActions.typeHabitData;
import static org.isoron.uhabits.ui.ShowHabitActivityActions.openHistoryEditor;
@RunWith(AndroidJUnit4.class)
@LargeTest
public class MainTest
{
private SystemHelper sys;
@Rule
public IntentsTestRule<MainActivity> activityRule = new IntentsTestRule<>(
MainActivity.class);
private Context targetContext;
@Before
public void setup()
{
Context context = InstrumentationRegistry.getInstrumentation().getContext();
sys = new SystemHelper(context);
sys.disableAllAnimations();
sys.acquireWakeLock();
sys.unlockScreen();
targetContext = InstrumentationRegistry.getTargetContext();
Instrumentation.ActivityResult okResult = new Instrumentation.ActivityResult(
Activity.RESULT_OK, new Intent());
intending(hasAction(equalTo(Intent.ACTION_SEND))).respondWith(okResult);
intending(hasAction(equalTo(Intent.ACTION_SENDTO))).respondWith(okResult);
intending(hasAction(equalTo(Intent.ACTION_VIEW))).respondWith(okResult);
skipTutorial();
}
@After
public void tearDown()
{
sys.releaseWakeLock();
}
public void skipTutorial()
{
try
{
for (int i = 0; i < 10; i++)
onView(allOf(withClassName(endsWith("AppCompatImageButton")),
isDisplayed())).perform(click());
}
catch (NoMatchingViewException e)
{
// ignored
}
}
/**
* User opens the app, creates some habits, selects them, archives them, select 'show archived'
* on the menu, selects the previously archived habits and then deletes them.
*/
@Test
public void testArchiveHabits()
{
List<String> names = new LinkedList<>();
for(int i = 0; i < 3; i++)
names.add(addHabit());
selectHabits(names);
clickMenuItem(R.string.archive);
assertHabitsDontExist(names);
clickMenuItem(R.string.show_archived);
assertHabitsExist(names);
selectHabits(names);
clickMenuItem(R.string.unarchive);
clickMenuItem(R.string.show_archived);
assertHabitsExist(names);
deleteHabits(names);
}
/**
* User opens the app, clicks the add button, types some bogus information, tries to save,
* dialog displays an error.
*/
@Test
public void testAddInvalidHabit()
{
onView(withId(R.id.action_add))
.perform(click());
typeHabitData("", "", "15", "7");
onView(withId(R.id.buttonSave)).perform(click());
onView(withId(R.id.input_name)).check(matches(isDisplayed()));
}
/**
* User creates a habit, toggles a bunch of checkmarks, clicks the habit to open the statistics
* screen, scrolls down to some views, then scrolls the views backwards and forwards in time.
*/
@Test
public void testAddHabitAndViewStats() throws InterruptedException
{
String name = addHabit(true);
onData(allOf(is(instanceOf(Habit.class)), withName(name)))
.onChildView(withId(R.id.llButtons))
.perform(toggleAllCheckmarks());
Thread.sleep(1200);
onData(allOf(is(instanceOf(Habit.class)), withName(name)))
.onChildView(withId(R.id.label))
.perform(click());
onView(withId(R.id.scoreView))
.perform(scrollTo(), swipeRight());
onView(withId(R.id.punchcardView))
.perform(scrollTo(), swipeRight());
}
/**
* User creates a habit, selects the habit, clicks edit button, changes some information about
* the habit, click save button, sees changes on the main window, selects habit again,
* changes color, then deletes the habit.
*/
@Test
public void testEditHabit()
{
String name = addHabit();
onData(allOf(is(instanceOf(Habit.class)), withName(name)))
.onChildView(withId(R.id.label))
.perform(longClick());
clickMenuItem(R.string.edit);
String modifiedName = "Modified " + new Random().nextInt(10000);
typeHabitData(modifiedName, "", "1", "1");
onView(withId(R.id.buttonSave))
.perform(click());
assertHabitExists(modifiedName);
selectHabit(modifiedName);
clickMenuItem(R.string.color_picker_default_title);
pressBack();
deleteHabit(modifiedName);
}
/**
* User creates a habit, opens statistics page, clicks button to edit history, adds some
* checkmarks, closes dialog, sees the modified history calendar.
*/
@Test
public void testEditHistory()
{
String name = addHabit();
onData(allOf(is(instanceOf(Habit.class)), withName(name)))
.onChildView(withId(R.id.label))
.perform(click());
openHistoryEditor();
onView(withClassName(endsWith("HabitHistoryView")))
.perform(clickAtRandomLocations(20));
pressBack();
onView(withId(R.id.historyView))
.perform(scrollTo(), swipeRight(), swipeLeft());
}
/**
* User opens menu, clicks settings, sees settings screen.
*/
@Test
public void testSettings()
{
clickMenuItem(R.string.settings);
}
/**
* User opens menu, clicks about, sees about screen.
*/
@Test
public void testAbout()
{
clickMenuItem(R.string.about);
onView(isRoot()).perform(swipeUp());
}
/**
* User opens menu, clicks Help, sees website.
*/
@Test
public void testHelp()
{
clickMenuItem(R.string.help);
intended(hasAction(Intent.ACTION_VIEW));
}
/**
* User creates a habit, exports full backup, deletes the habit, restores backup, sees that the
* previously created habit has appeared back.
*/
@Test
public void testExportImportDB()
{
String name = addHabit();
clickMenuItem(R.string.settings);
String date = DateHelper.getBackupDateFormat().format(DateHelper.getLocalTime());
date = date.substring(0, date.length() - 2);
clickSettingsItem("Export full backup");
intended(hasAction(Intent.ACTION_SEND));
deleteHabit(name);
clickMenuItem(R.string.settings);
clickSettingsItem("Import data");
onData(allOf(is(instanceOf(String.class)), startsWith("Backups")))
.perform(click());
onData(allOf(is(instanceOf(String.class)), containsString(date)))
.perform(click());
selectHabit(name);
}
/**
* User creates a habit, opens settings, clicks export as CSV, is asked what activity should
* handle the file.
*/
@Test
public void testExportCSV()
{
addHabit();
clickMenuItem(R.string.settings);
clickSettingsItem("Export as CSV");
intended(hasAction(Intent.ACTION_SEND));
}
/**
* User opens the settings and generates a bug report.
*/
@Test
public void testGenerateBugReport()
{
clickMenuItem(R.string.settings);
clickSettingsItem("Generate bug report");
intended(hasAction(Intent.ACTION_SENDTO));
}
}

View File

@@ -1,105 +0,0 @@
package org.isoron.uhabits.ui;
import android.app.KeyguardManager;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.IBinder;
import android.os.PowerManager;
import android.support.test.runner.AndroidJUnitRunner;
import android.util.Log;
import java.lang.reflect.Method;
public final class SystemHelper extends AndroidJUnitRunner
{
private static final String ANIMATION_PERMISSION = "android.permission.SET_ANIMATION_SCALE";
private static final float DISABLED = 0.0f;
private static final float DEFAULT = 1.0f;
private final Context context;
private PowerManager.WakeLock wakeLock;
SystemHelper(Context context)
{
this.context = context;
}
void acquireWakeLock()
{
PowerManager power = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
wakeLock = power.newWakeLock(PowerManager.FULL_WAKE_LOCK |
PowerManager.ACQUIRE_CAUSES_WAKEUP |
PowerManager.ON_AFTER_RELEASE, getClass().getSimpleName());
wakeLock.acquire();
}
void releaseWakeLock()
{
if(wakeLock != null)
wakeLock.release();
}
void unlockScreen()
{
Log.i("SystemHelper", "Trying to unlock screen");
try
{
KeyguardManager mKeyGuardManager =
(KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
KeyguardManager.KeyguardLock mLock = mKeyGuardManager.newKeyguardLock("lock");
mLock.disableKeyguard();
Log.e("SystemHelper", "Successfully unlocked screen");
} catch (Exception e)
{
Log.e("SystemHelper", "Could not unlock screen");
e.printStackTrace();
}
}
void disableAllAnimations()
{
Log.i("SystemHelper", "Trying to disable animations");
int permStatus = context.checkCallingOrSelfPermission(ANIMATION_PERMISSION);
if (permStatus == PackageManager.PERMISSION_GRANTED) setSystemAnimationsScale(DISABLED);
else Log.e("SystemHelper", "Permission denied");
}
void enableAllAnimations()
{
int permStatus = context.checkCallingOrSelfPermission(ANIMATION_PERMISSION);
if (permStatus == PackageManager.PERMISSION_GRANTED)
{
setSystemAnimationsScale(DEFAULT);
}
}
private void setSystemAnimationsScale(float animationScale)
{
try
{
Class<?> windowManagerStubClazz = Class.forName("android.view.IWindowManager$Stub");
Method asInterface =
windowManagerStubClazz.getDeclaredMethod("asInterface", IBinder.class);
Class<?> serviceManagerClazz = Class.forName("android.os.ServiceManager");
Method getService = serviceManagerClazz.getDeclaredMethod("getService", String.class);
Class<?> windowManagerClazz = Class.forName("android.view.IWindowManager");
Method setAnimationScales =
windowManagerClazz.getDeclaredMethod("setAnimationScales", float[].class);
Method getAnimationScales = windowManagerClazz.getDeclaredMethod("getAnimationScales");
IBinder windowManagerBinder = (IBinder) getService.invoke(null, "window");
Object windowManagerObj = asInterface.invoke(null, windowManagerBinder);
float[] currentScales = (float[]) getAnimationScales.invoke(windowManagerObj);
for (int i = 0; i < currentScales.length; i++)
currentScales[i] = animationScale;
setAnimationScales.invoke(windowManagerObj, new Object[]{currentScales});
Log.i("SystemHelper", "All animations successfully disabled");
}
catch (Exception e)
{
Log.e("SystemHelper", "Could not change animation scale to " + animationScale + " :'(");
}
}
}

View File

@@ -1,168 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit;
import android.content.Context;
import android.support.annotation.Nullable;
import android.util.Log;
import org.isoron.uhabits.helpers.DatabaseHelper;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.tasks.BaseTask;
import org.isoron.uhabits.tasks.ExportDBTask;
import org.isoron.uhabits.tasks.ImportDataTask;
import java.io.File;
import java.io.InputStream;
import java.util.Random;
import static org.junit.Assert.fail;
public class HabitFixtures
{
public static boolean NON_DAILY_HABIT_CHECKS[] = { true, false, false, true, true, true, false,
false, true, true };
public static Habit createShortHabit()
{
Habit habit = new Habit();
habit.name = "Wake up early";
habit.description = "Did you wake up before 6am?";
habit.freqNum = 2;
habit.freqDen = 3;
habit.save();
long timestamp = DateHelper.getStartOfToday();
for(boolean c : NON_DAILY_HABIT_CHECKS)
{
if(c) habit.repetitions.toggle(timestamp);
timestamp -= DateHelper.millisecondsInOneDay;
}
return habit;
}
public static Habit createEmptyHabit()
{
Habit habit = new Habit();
habit.name = "Meditate";
habit.description = "Did you meditate this morning?";
habit.color = 3;
habit.freqNum = 1;
habit.freqDen = 1;
habit.save();
return habit;
}
public static Habit createLongHabit()
{
Habit habit = createEmptyHabit();
habit.freqNum = 3;
habit.freqDen = 7;
habit.color = 4;
habit.save();
long day = DateHelper.millisecondsInOneDay;
long today = DateHelper.getStartOfToday();
int marks[] = { 0, 1, 3, 5, 7, 8, 9, 10, 12, 14, 15, 17, 19, 20, 26, 27, 28, 50, 51, 52,
53, 54, 58, 60, 63, 65, 70, 71, 72, 73, 74, 75, 80, 81, 83, 89, 90, 91, 95,
102, 103, 108, 109, 120};
for(int mark : marks)
habit.repetitions.toggle(today - mark * day);
return habit;
}
public static void generateHugeDataSet() throws Throwable
{
final int nHabits = 30;
final int nYears = 5;
DatabaseHelper.executeAsTransaction(new DatabaseHelper.Command()
{
@Override
public void execute()
{
Random rand = new Random();
for(int i = 0; i < nHabits; i++)
{
Log.i("HabitFixture", String.format("Creating habit %d / %d", i, nHabits));
Habit habit = new Habit();
habit.name = String.format("Habit %d", i);
habit.save();
long today = DateHelper.getStartOfToday();
long day = DateHelper.millisecondsInOneDay;
for(int j = 0; j < 365 * nYears; j++)
{
if(rand.nextBoolean())
habit.repetitions.toggle(today - j * day);
}
habit.scores.getTodayValue();
habit.streaks.getAll(1);
}
}
});
ExportDBTask task = new ExportDBTask(null);
task.setListener(new ExportDBTask.Listener()
{
@Override
public void onExportDBFinished(@Nullable String filename)
{
if(filename != null)
Log.i("HabitFixture", String.format("Huge data set exported to %s", filename));
else
Log.i("HabitFixture", "Failed to save database");
}
});
task.execute();
BaseTask.waitForTasks(30000);
}
public static void loadHugeDataSet(Context testContext) throws Throwable
{
File baseDir = DatabaseHelper.getFilesDir("Backups");
if(baseDir == null) fail("baseDir should not be null");
File dst = new File(String.format("%s/%s", baseDir.getPath(), "loopHuge.db"));
InputStream in = testContext.getAssets().open("fixtures/loopHuge.db");
DatabaseHelper.copy(in, dst);
ImportDataTask task = new ImportDataTask(dst, null);
task.execute();
BaseTask.waitForTasks(30000);
}
public static void purgeHabits()
{
for(Habit h : Habit.getAll(true))
h.cascadeDelete();
}
}

View File

@@ -1,51 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit;
import android.os.Build;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.HabitsApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.IOException;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class HabitsApplicationTest
{
@Test
public void test_getLogcat() throws IOException
{
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN)
return;
String msg = "LOGCAT TEST";
new RuntimeException(msg).printStackTrace();
String log = HabitsApplication.getLogcat();
assertThat(log, containsString(msg));
}
}

View File

@@ -1,69 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.commands;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.commands.ArchiveHabitsCommand;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.Collections;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class ArchiveHabitsCommandTest extends BaseTest
{
private ArchiveHabitsCommand command;
private Habit habit;
@Before
public void setup()
{
super.setup();
habit = HabitFixtures.createShortHabit();
command = new ArchiveHabitsCommand(Collections.singletonList(habit));
}
@Test
public void testExecuteUndoRedo()
{
assertFalse(habit.isArchived());
command.execute();
assertTrue(habit.isArchived());
command.undo();
assertFalse(habit.isArchived());
command.execute();
assertTrue(habit.isArchived());
}
}

View File

@@ -1,90 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.commands;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.commands.ChangeHabitColorCommand;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.LinkedList;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class ChangeHabitColorCommandTest extends BaseTest
{
private ChangeHabitColorCommand command;
private LinkedList<Habit> habits;
@Before
public void setup()
{
super.setup();
habits = new LinkedList<>();
for(int i = 0; i < 3; i ++)
{
Habit habit = HabitFixtures.createShortHabit();
habit.color = i+1;
habit.save();
habits.add(habit);
}
command = new ChangeHabitColorCommand(habits, 0);
}
@Test
public void testExecuteUndoRedo()
{
checkOriginalColors();
command.execute();
checkNewColors();
command.undo();
checkOriginalColors();
command.execute();
checkNewColors();
}
private void checkOriginalColors()
{
int k = 0;
for(Habit h : habits)
assertThat(h.color, equalTo(++k));
}
private void checkNewColors()
{
for(Habit h : habits)
assertThat(h.color, equalTo(0));
}
}

View File

@@ -1,85 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.commands;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.commands.CreateHabitCommand;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.List;
import static junit.framework.Assert.assertTrue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class CreateHabitCommandTest extends BaseTest
{
private CreateHabitCommand command;
private Habit model;
@Before
public void setup()
{
super.setup();
model = new Habit();
model.name = "New habit";
command = new CreateHabitCommand(model);
HabitFixtures.purgeHabits();
}
@Test
public void testExecuteUndoRedo()
{
assertTrue(Habit.getAll(true).isEmpty());
command.execute();
List<Habit> allHabits = Habit.getAll(true);
assertThat(allHabits.size(), equalTo(1));
Habit habit = allHabits.get(0);
Long id = habit.getId();
assertThat(habit.name, equalTo(model.name));
command.undo();
assertTrue(Habit.getAll(true).isEmpty());
command.execute();
allHabits = Habit.getAll(true);
assertThat(allHabits.size(), equalTo(1));
habit = allHabits.get(0);
Long newId = habit.getId();
assertThat(id, equalTo(newId));
assertThat(habit.name, equalTo(model.name));
}
}

View File

@@ -1,85 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.commands;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.commands.DeleteHabitsCommand;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import java.util.LinkedList;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class DeleteHabitsCommandTest extends BaseTest
{
private DeleteHabitsCommand command;
private LinkedList<Habit> habits;
@Rule
public ExpectedException thrown = ExpectedException.none();
@Before
public void setup()
{
super.setup();
HabitFixtures.purgeHabits();
habits = new LinkedList<>();
// Habits that shuold be deleted
for(int i = 0; i < 3; i ++)
{
Habit habit = HabitFixtures.createShortHabit();
habits.add(habit);
}
// Extra habit that should not be deleted
Habit extraHabit = HabitFixtures.createShortHabit();
extraHabit.name = "extra";
extraHabit.save();
command = new DeleteHabitsCommand(habits);
}
@Test
public void testExecuteUndoRedo()
{
assertThat(Habit.getAll(true).size(), equalTo(4));
command.execute();
assertThat(Habit.getAll(true).size(), equalTo(1));
assertThat(Habit.getAll(true).get(0).name, equalTo("extra"));
thrown.expect(UnsupportedOperationException.class);
command.undo();
}
}

View File

@@ -1,120 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.commands;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.commands.EditHabitCommand;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import static junit.framework.Assert.assertTrue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class EditHabitCommandTest extends BaseTest
{
private EditHabitCommand command;
private Habit habit;
private Habit modified;
private Long id;
@Before
public void setup()
{
super.setup();
habit = HabitFixtures.createShortHabit();
habit.name = "original";
habit.freqDen = 1;
habit.freqNum = 1;
habit.save();
id = habit.getId();
modified = new Habit(habit);
modified.name = "modified";
}
@Test
public void testExecuteUndoRedo()
{
command = new EditHabitCommand(habit, modified);
int originalScore = habit.scores.getTodayValue();
assertThat(habit.name, equalTo("original"));
command.execute();
refreshHabit();
assertThat(habit.name, equalTo("modified"));
assertThat(habit.scores.getTodayValue(), equalTo(originalScore));
command.undo();
refreshHabit();
assertThat(habit.name, equalTo("original"));
assertThat(habit.scores.getTodayValue(), equalTo(originalScore));
command.execute();
refreshHabit();
assertThat(habit.name, equalTo("modified"));
assertThat(habit.scores.getTodayValue(), equalTo(originalScore));
}
@Test
public void testExecuteUndoRedo_withModifiedInterval()
{
modified.freqNum = 1;
modified.freqDen = 7;
command = new EditHabitCommand(habit, modified);
int originalScore = habit.scores.getTodayValue();
assertThat(habit.name, equalTo("original"));
command.execute();
refreshHabit();
assertThat(habit.name, equalTo("modified"));
assertThat(habit.scores.getTodayValue(), greaterThan(originalScore));
command.undo();
refreshHabit();
assertThat(habit.name, equalTo("original"));
assertThat(habit.scores.getTodayValue(), equalTo(originalScore));
command.execute();
refreshHabit();
assertThat(habit.name, equalTo("modified"));
assertThat(habit.scores.getTodayValue(), greaterThan(originalScore));
}
private void refreshHabit()
{
habit = Habit.get(id);
assertTrue(habit != null);
}
}

View File

@@ -1,71 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.commands;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.commands.ToggleRepetitionCommand;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class ToggleRepetitionCommandTest extends BaseTest
{
private ToggleRepetitionCommand command;
private Habit habit;
private long today;
@Before
public void setup()
{
super.setup();
habit = HabitFixtures.createShortHabit();
today = DateHelper.getStartOfToday();
command = new ToggleRepetitionCommand(habit, today);
}
@Test
public void testExecuteUndoRedo()
{
assertTrue(habit.repetitions.contains(today));
command.execute();
assertFalse(habit.repetitions.contains(today));
command.undo();
assertTrue(habit.repetitions.contains(today));
command.execute();
assertFalse(habit.repetitions.contains(today));
}
}

View File

@@ -1,71 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.commands;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.commands.UnarchiveHabitsCommand;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.Collections;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class UnarchiveHabitsCommandTest extends BaseTest
{
private UnarchiveHabitsCommand command;
private Habit habit;
@Before
public void setup()
{
super.setup();
habit = HabitFixtures.createShortHabit();
Habit.archive(Collections.singletonList(habit));
command = new UnarchiveHabitsCommand(Collections.singletonList(habit));
}
@Test
public void testExecuteUndoRedo()
{
assertTrue(habit.isArchived());
command.execute();
assertFalse(habit.isArchived());
command.undo();
assertTrue(habit.isArchived());
command.execute();
assertFalse(habit.isArchived());
}
}

View File

@@ -1,118 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.io;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.helpers.DatabaseHelper;
import org.isoron.uhabits.io.HabitsCSVExporter;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Enumeration;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import static junit.framework.Assert.assertTrue;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class HabitsCSVExporterTest extends BaseTest
{
private File baseDir;
@Before
public void setup()
{
super.setup();
HabitFixtures.purgeHabits();
HabitFixtures.createShortHabit();
HabitFixtures.createEmptyHabit();
Context targetContext = InstrumentationRegistry.getTargetContext();
baseDir = targetContext.getCacheDir();
}
private void unzip(File file) throws IOException
{
ZipFile zip = new ZipFile(file);
Enumeration<? extends ZipEntry> e = zip.entries();
while(e.hasMoreElements())
{
ZipEntry entry = e.nextElement();
InputStream stream = zip.getInputStream(entry);
String outputFilename = String.format("%s/%s", baseDir.getAbsolutePath(),
entry.getName());
File outputFile = new File(outputFilename);
File parent = outputFile.getParentFile();
if(parent != null) parent.mkdirs();
DatabaseHelper.copy(stream, outputFile);
}
zip.close();
}
@Test
public void testExportCSV() throws IOException
{
List<Habit> habits = Habit.getAll(true);
HabitsCSVExporter exporter = new HabitsCSVExporter(habits, baseDir);
String filename = exporter.writeArchive();
assertAbsolutePathExists(filename);
File archive = new File(filename);
unzip(archive);
assertPathExists("Habits.csv");
assertPathExists("001 Wake up early");
assertPathExists("001 Wake up early/Checkmarks.csv");
assertPathExists("001 Wake up early/Scores.csv");
assertPathExists("002 Meditate/Checkmarks.csv");
assertPathExists("002 Meditate/Scores.csv");
}
private void assertPathExists(String s)
{
assertAbsolutePathExists(String.format("%s/%s", baseDir.getAbsolutePath(), s));
}
private void assertAbsolutePathExists(String s)
{
File file = new File(s);
assertTrue(String.format("File %s should exist", file.getAbsolutePath()), file.exists());
}
}

View File

@@ -1,173 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.io;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.helpers.DatabaseHelper;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.io.GenericImporter;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.GregorianCalendar;
import java.util.List;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class ImportTest extends BaseTest
{
private File baseDir;
private Context context;
@Before
public void setup()
{
super.setup();
DateHelper.setFixedLocalTime(null);
HabitFixtures.purgeHabits();
context = InstrumentationRegistry.getInstrumentation().getContext();
baseDir = DatabaseHelper.getFilesDir("Backups");
if(baseDir == null) fail("baseDir should not be null");
}
private void copyAssetToFile(String assetPath, File dst) throws IOException
{
InputStream in = context.getAssets().open(assetPath);
DatabaseHelper.copy(in, dst);
}
private void importFromFile(String assetFilename) throws IOException
{
File file = new File(String.format("%s/%s", baseDir.getPath(), assetFilename));
copyAssetToFile(assetFilename, file);
assertTrue(file.exists());
assertTrue(file.canRead());
GenericImporter importer = new GenericImporter();
assertThat(importer.canHandle(file), is(true));
importer.importHabitsFromFile(file);
}
private boolean containsRepetition(Habit h, int year, int month, int day)
{
GregorianCalendar date = DateHelper.getStartOfTodayCalendar();
date.set(year, month - 1, day);
return h.repetitions.contains(date.getTimeInMillis());
}
@Test
public void testTickmateDB() throws IOException
{
importFromFile("tickmate.db");
List<Habit> habits = Habit.getAll(true);
assertThat(habits.size(), equalTo(3));
Habit h = habits.get(0);
assertThat(h.name, equalTo("Vegan"));
assertTrue(containsRepetition(h, 2016, 1, 24));
assertTrue(containsRepetition(h, 2016, 2, 5));
assertTrue(containsRepetition(h, 2016, 3, 18));
assertFalse(containsRepetition(h, 2016, 3, 14));
}
@Test
public void testRewireDB() throws IOException
{
importFromFile("rewire.db");
List<Habit> habits = Habit.getAll(true);
assertThat(habits.size(), equalTo(3));
Habit habit = habits.get(0);
assertThat(habit.name, equalTo("Wake up early"));
assertThat(habit.freqNum, equalTo(3));
assertThat(habit.freqDen, equalTo(7));
assertFalse(habit.hasReminder());
assertFalse(containsRepetition(habit, 2015, 12, 31));
assertTrue(containsRepetition(habit, 2016, 1, 18));
assertTrue(containsRepetition(habit, 2016, 1, 28));
assertFalse(containsRepetition(habit, 2016, 3, 10));
habit = habits.get(1);
assertThat(habit.name, equalTo("brush teeth"));
assertThat(habit.freqNum, equalTo(3));
assertThat(habit.freqDen, equalTo(7));
assertThat(habit.reminderHour, equalTo(8));
assertThat(habit.reminderMin, equalTo(0));
boolean[] reminderDays = {false, true, true, true, true, true, false};
assertThat(habit.reminderDays, equalTo(DateHelper.packWeekdayList(reminderDays)));
}
@Test
public void testHabitBullCSV() throws IOException
{
importFromFile("habitbull.csv");
List<Habit> habits = Habit.getAll(true);
assertThat(habits.size(), equalTo(4));
Habit habit = habits.get(0);
assertThat(habit.name, equalTo("Breed dragons"));
assertThat(habit.description, equalTo("with love and fire"));
assertThat(habit.freqNum, equalTo(1));
assertThat(habit.freqDen, equalTo(1));
assertTrue(containsRepetition(habit, 2016, 3, 18));
assertTrue(containsRepetition(habit, 2016, 3, 19));
assertFalse(containsRepetition(habit, 2016, 3, 20));
}
@Test
public void testLoopDB() throws IOException
{
importFromFile("loop.db");
List<Habit> habits = Habit.getAll(true);
assertThat(habits.size(), equalTo(9));
Habit habit = habits.get(0);
assertThat(habit.name, equalTo("Wake up early"));
assertThat(habit.freqNum, equalTo(3));
assertThat(habit.freqDen, equalTo(7));
assertTrue(containsRepetition(habit, 2016, 3, 14));
assertTrue(containsRepetition(habit, 2016, 3, 16));
assertFalse(containsRepetition(habit, 2016, 3, 17));
}
}

View File

@@ -1,175 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.models;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.IOException;
import java.io.StringWriter;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.isoron.uhabits.models.Checkmark.CHECKED_EXPLICITLY;
import static org.isoron.uhabits.models.Checkmark.CHECKED_IMPLICITLY;
import static org.isoron.uhabits.models.Checkmark.UNCHECKED;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class CheckmarkListTest extends BaseTest
{
Habit nonDailyHabit;
private Habit emptyHabit;
@Before
public void setup()
{
super.setup();
HabitFixtures.purgeHabits();
nonDailyHabit = HabitFixtures.createShortHabit();
emptyHabit = HabitFixtures.createEmptyHabit();
}
@After
public void tearDown()
{
DateHelper.setFixedLocalTime(null);
}
@Test
public void test_getAllValues_withNonDailyHabit()
{
int[] expectedValues = { CHECKED_EXPLICITLY, UNCHECKED, CHECKED_IMPLICITLY,
CHECKED_EXPLICITLY, CHECKED_EXPLICITLY, CHECKED_EXPLICITLY, UNCHECKED,
CHECKED_IMPLICITLY, CHECKED_EXPLICITLY, CHECKED_EXPLICITLY };
int[] actualValues = nonDailyHabit.checkmarks.getAllValues();
assertThat(actualValues, equalTo(expectedValues));
}
@Test
public void test_getAllValues_withEmptyHabit()
{
int[] expectedValues = new int[0];
int[] actualValues = emptyHabit.checkmarks.getAllValues();
assertThat(actualValues, equalTo(expectedValues));
}
@Test
public void test_getAllValues_moveForwardInTime()
{
travelInTime(3);
int[] expectedValues = { UNCHECKED, UNCHECKED, UNCHECKED, CHECKED_EXPLICITLY, UNCHECKED,
CHECKED_IMPLICITLY, CHECKED_EXPLICITLY, CHECKED_EXPLICITLY, CHECKED_EXPLICITLY,
UNCHECKED, CHECKED_IMPLICITLY, CHECKED_EXPLICITLY, CHECKED_EXPLICITLY };
int[] actualValues = nonDailyHabit.checkmarks.getAllValues();
assertThat(actualValues, equalTo(expectedValues));
}
@Test
public void test_getAllValues_moveBackwardsInTime()
{
travelInTime(-3);
int[] expectedValues = { CHECKED_EXPLICITLY, CHECKED_EXPLICITLY, CHECKED_EXPLICITLY,
UNCHECKED, CHECKED_IMPLICITLY, CHECKED_EXPLICITLY, CHECKED_EXPLICITLY };
int[] actualValues = nonDailyHabit.checkmarks.getAllValues();
assertThat(actualValues, equalTo(expectedValues));
}
@Test
public void test_getValues_withInvalidInterval()
{
int values[] = nonDailyHabit.checkmarks.getValues(100L, -100L);
assertThat(values, equalTo(new int[0]));
}
@Test
public void test_getValues_withValidInterval()
{
long from = DateHelper.getStartOfToday() - 15 * DateHelper.millisecondsInOneDay;
long to = DateHelper.getStartOfToday() - 5 * DateHelper.millisecondsInOneDay;
int[] expectedValues = { CHECKED_EXPLICITLY, UNCHECKED, CHECKED_IMPLICITLY,
CHECKED_EXPLICITLY, CHECKED_EXPLICITLY, UNCHECKED, UNCHECKED, UNCHECKED, UNCHECKED,
UNCHECKED, UNCHECKED };
int[] actualValues = nonDailyHabit.checkmarks.getValues(from, to);
assertThat(actualValues, equalTo(expectedValues));
}
@Test
public void test_getTodayValue()
{
travelInTime(-1);
assertThat(nonDailyHabit.checkmarks.getTodayValue(), equalTo(UNCHECKED));
travelInTime(0);
assertThat(nonDailyHabit.checkmarks.getTodayValue(), equalTo(CHECKED_EXPLICITLY));
travelInTime(1);
assertThat(nonDailyHabit.checkmarks.getTodayValue(), equalTo(UNCHECKED));
}
@Test
public void test_writeCSV() throws IOException
{
String expectedCSV =
"2015-01-16,2\n" +
"2015-01-17,2\n" +
"2015-01-18,1\n" +
"2015-01-19,0\n" +
"2015-01-20,2\n" +
"2015-01-21,2\n" +
"2015-01-22,2\n" +
"2015-01-23,1\n" +
"2015-01-24,0\n" +
"2015-01-25,2\n";
StringWriter writer = new StringWriter();
nonDailyHabit.checkmarks.writeCSV(writer);
assertThat(writer.toString(), equalTo(expectedCSV));
}
private void travelInTime(int days)
{
DateHelper.setFixedLocalTime(FIXED_LOCAL_TIME +
days * DateHelper.millisecondsInOneDay);
}
}

View File

@@ -1,378 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.models;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.hamcrest.MatcherAssert;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.IOException;
import java.io.StringWriter;
import java.util.LinkedList;
import java.util.List;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.core.IsNot.not;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class HabitTest extends BaseTest
{
@Before
public void setup()
{
super.setup();
HabitFixtures.purgeHabits();
}
@Test
public void testConstructor_default()
{
Habit habit = new Habit();
assertThat(habit.archived, is(0));
assertThat(habit.highlight, is(0));
assertThat(habit.reminderHour, is(nullValue()));
assertThat(habit.reminderMin, is(nullValue()));
assertThat(habit.reminderDays, is(not(nullValue())));
assertThat(habit.streaks, is(not(nullValue())));
assertThat(habit.scores, is(not(nullValue())));
assertThat(habit.repetitions, is(not(nullValue())));
assertThat(habit.checkmarks, is(not(nullValue())));
}
@Test
public void testConstructor_habit()
{
Habit model = new Habit();
model.archived = 1;
model.highlight = 1;
model.color = 0;
model.freqNum = 10;
model.freqDen = 20;
model.reminderDays = 1;
model.reminderHour = 8;
model.reminderMin = 30;
model.position = 0;
Habit habit = new Habit(model);
assertThat(habit.archived, is(model.archived));
assertThat(habit.highlight, is(model.highlight));
assertThat(habit.color, is(model.color));
assertThat(habit.freqNum, is(model.freqNum));
assertThat(habit.freqDen, is(model.freqDen));
assertThat(habit.reminderDays, is(model.reminderDays));
assertThat(habit.reminderHour, is(model.reminderHour));
assertThat(habit.reminderMin, is(model.reminderMin));
assertThat(habit.position, is(model.position));
}
@Test
public void test_get_withValidId()
{
Habit habit = new Habit();
habit.save();
Habit habit2 = Habit.get(habit.getId());
assertThat(habit, equalTo(habit2));
}
@Test
public void test_get_withInvalidId()
{
Habit habit = Habit.get(123456L);
assertThat(habit, is(nullValue()));
}
@Test
public void test_getAll_withoutArchived()
{
List<Habit> habits = new LinkedList<>();
List<Habit> habitsWithArchived = new LinkedList<>();
for(int i = 0; i < 10; i++)
{
Habit h = new Habit();
if(i % 2 == 0)
h.archived = 1;
else
habits.add(h);
habitsWithArchived.add(h);
h.save();
}
assertThat(habits, equalTo(Habit.getAll(false)));
assertThat(habitsWithArchived, equalTo(Habit.getAll(true)));
}
@Test
public void test_getByPosition()
{
List<Habit> habits = new LinkedList<>();
for(int i = 0; i < 10; i++)
{
Habit h = new Habit();
h.save();
habits.add(h);
}
for(int i = 0; i < 10; i++)
{
Habit h = Habit.getByPosition(i);
if(h == null) fail();
assertThat(h, equalTo(habits.get(i)));
}
}
@Test
public void test_count()
{
for(int i = 0; i < 10; i++)
{
Habit h = new Habit();
if(i % 2 == 0) h.archived = 1;
h.save();
}
assertThat(Habit.count(), equalTo(5));
}
@Test
public void test_countWithArchived()
{
for(int i = 0; i < 10; i++)
{
Habit h = new Habit();
if(i % 2 == 0) h.archived = 1;
h.save();
}
assertThat(Habit.countWithArchived(), equalTo(10));
}
@Test
public void test_updateId()
{
Habit habit = new Habit();
habit.name = "Hello World";
habit.save();
Long oldId = habit.getId();
Long newId = 123456L;
Habit.updateId(oldId, newId);
Habit newHabit = Habit.get(newId);
if(newHabit == null) fail();
assertThat(newHabit, is(not(nullValue())));
assertThat(newHabit.name, equalTo(habit.name));
}
@Test
public void test_reorder()
{
List<Long> ids = new LinkedList<>();
int n = 10;
for (int i = 0; i < n; i++)
{
Habit h = new Habit();
h.save();
ids.add(h.getId());
assertThat(h.position, is(i));
}
int operations[][] = {
{5, 2},
{3, 7},
{4, 4},
{3, 2}
};
int expectedPosition[][] = {
{0, 1, 3, 4, 5, 2, 6, 7, 8, 9},
{0, 1, 7, 3, 4, 2, 5, 6, 8, 9},
{0, 1, 7, 3, 4, 2, 5, 6, 8, 9},
{0, 1, 7, 2, 4, 3, 5, 6, 8, 9},
};
for(int i = 0; i < operations.length; i++)
{
int from = operations[i][0];
int to = operations[i][1];
Habit fromHabit = Habit.getByPosition(from);
Habit toHabit = Habit.getByPosition(to);
Habit.reorder(fromHabit, toHabit);
int actualPositions[] = new int[n];
for (int j = 0; j < n; j++)
{
Habit h = Habit.get(ids.get(j));
if (h == null) fail();
actualPositions[j] = h.position;
}
assertThat(actualPositions, equalTo(expectedPosition[i]));
}
}
@Test
public void test_rebuildOrder()
{
List<Long> ids = new LinkedList<>();
int originalPositions[] = { 0, 1, 1, 4, 6, 8, 10, 10, 13};
for (int p : originalPositions)
{
Habit h = new Habit();
h.position = p;
h.save();
ids.add(h.getId());
}
Habit.rebuildOrder();
for (int i = 0; i < originalPositions.length; i++)
{
Habit h = Habit.get(ids.get(i));
if(h == null) fail();
assertThat(h.position, is(i));
}
}
@Test
public void test_getHabitsWithReminder()
{
List<Habit> habitsWithReminder = new LinkedList<>();
for(int i = 0; i < 10; i++)
{
Habit habit = new Habit();
if(i % 2 == 0)
{
habit.reminderDays = DateHelper.ALL_WEEK_DAYS;
habit.reminderHour = 8;
habit.reminderMin = 30;
habitsWithReminder.add(habit);
}
habit.save();
}
assertThat(habitsWithReminder, equalTo(Habit.getHabitsWithReminder()));
}
@Test
public void test_archive_unarchive()
{
List<Habit> allHabits = new LinkedList<>();
List<Habit> archivedHabits = new LinkedList<>();
List<Habit> unarchivedHabits = new LinkedList<>();
for(int i = 0; i < 10; i++)
{
Habit habit = new Habit();
habit.save();
allHabits.add(habit);
if(i % 2 == 0)
archivedHabits.add(habit);
else
unarchivedHabits.add(habit);
}
Habit.archive(archivedHabits);
assertThat(Habit.getAll(false), equalTo(unarchivedHabits));
assertThat(Habit.getAll(true), equalTo(allHabits));
Habit.unarchive(archivedHabits);
assertThat(Habit.getAll(false), equalTo(allHabits));
assertThat(Habit.getAll(true), equalTo(allHabits));
}
@Test
public void test_setColor()
{
List<Habit> habits = new LinkedList<>();
for(int i = 0; i < 10; i++)
{
Habit habit = new Habit();
habit.color = i;
habit.save();
habits.add(habit);
}
int newColor = 100;
Habit.setColor(habits, newColor);
for(Habit h : habits)
assertThat(h.color, equalTo(newColor));
}
@Test
public void test_hasReminder_clearReminder()
{
Habit h = new Habit();
assertThat(h.hasReminder(), is(false));
h.reminderDays = DateHelper.ALL_WEEK_DAYS;
h.reminderHour = 8;
h.reminderMin = 30;
assertThat(h.hasReminder(), is(true));
h.clearReminder();
assertThat(h.hasReminder(), is(false));
}
@Test
public void test_writeCSV() throws IOException
{
HabitFixtures.createEmptyHabit();
HabitFixtures.createShortHabit();
String expectedCSV =
"Name,Description,NumRepetitions,Interval,Color\n" +
"Meditate,Did you meditate this morning?,1,1,#AFB42B\n" +
"Wake up early,Did you wake up before 6am?,2,3,#00897B\n";
StringWriter writer = new StringWriter();
Habit.writeCSV(Habit.getAll(true), writer);
MatcherAssert.assertThat(writer.toString(), equalTo(expectedCSV));
}
}

View File

@@ -1,191 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.models;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.models.Repetition;
import org.isoron.uhabits.unit.HabitFixtures;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.Arrays;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Random;
import static junit.framework.Assert.assertFalse;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class RepetitionListTest extends BaseTest
{
private Habit habit;
private Habit emptyHabit;
@Before
public void setup()
{
super.setup();
HabitFixtures.purgeHabits();
habit = HabitFixtures.createShortHabit();
emptyHabit = HabitFixtures.createEmptyHabit();
}
@After
public void tearDown()
{
DateHelper.setFixedLocalTime(null);
}
@Test
public void test_contains()
{
long current = DateHelper.getStartOfToday();
for(boolean b : HabitFixtures.NON_DAILY_HABIT_CHECKS)
{
assertThat(habit.repetitions.contains(current), equalTo(b));
current -= DateHelper.millisecondsInOneDay;
}
for(int i = 0; i < 3; i++)
{
assertThat(habit.repetitions.contains(current), equalTo(false));
current -= DateHelper.millisecondsInOneDay;
}
}
@Test
public void test_delete()
{
long timestamp = DateHelper.getStartOfToday();
assertThat(habit.repetitions.contains(timestamp), equalTo(true));
habit.repetitions.delete(timestamp);
assertThat(habit.repetitions.contains(timestamp), equalTo(false));
}
@Test
public void test_toggle()
{
long timestamp = DateHelper.getStartOfToday();
assertThat(habit.repetitions.contains(timestamp), equalTo(true));
habit.repetitions.toggle(timestamp);
assertThat(habit.repetitions.contains(timestamp), equalTo(false));
habit.repetitions.toggle(timestamp);
assertThat(habit.repetitions.contains(timestamp), equalTo(true));
}
@Test
public void test_getWeekDayFrequency()
{
Random random = new Random();
Integer weekdayCount[][] = new Integer[12][7];
Integer monthCount[] = new Integer[12];
Arrays.fill(monthCount, 0);
for(Integer row[] : weekdayCount)
Arrays.fill(row, 0);
GregorianCalendar day = DateHelper.getStartOfTodayCalendar();
// Sets the current date to the end of November
day.set(2015, 10, 30);
DateHelper.setFixedLocalTime(day.getTimeInMillis());
// Add repetitions randomly from January to December
// Leaves the month of March empty, to check that it returns null
day.set(2015, 0, 1);
for(int i = 0; i < 365; i ++)
{
if(random.nextBoolean())
{
int month = day.get(Calendar.MONTH);
int week = day.get(Calendar.DAY_OF_WEEK) % 7;
if(month != 2)
{
if (month <= 10)
{
weekdayCount[month][week]++;
monthCount[month]++;
}
emptyHabit.repetitions.toggle(day.getTimeInMillis());
}
}
day.add(Calendar.DAY_OF_YEAR, 1);
}
HashMap<Long, Integer[]> freq = emptyHabit.repetitions.getWeekdayFrequency();
// Repetitions until November should be counted correctly
for(int month = 0; month < 11; month++)
{
day.set(2015, month, 1);
Integer actualCount[] = freq.get(day.getTimeInMillis());
if(monthCount[month] == 0)
assertThat(actualCount, equalTo(null));
else
assertThat(actualCount, equalTo(weekdayCount[month]));
}
// Repetitions in December should be discarded
day.set(2015, 11, 1);
assertThat(freq.get(day.getTimeInMillis()), equalTo(null));
}
@Test
public void test_count()
{
long to = DateHelper.getStartOfToday();
long from = to - 9 * DateHelper.millisecondsInOneDay;
assertThat(habit.repetitions.count(from, to), equalTo(6));
to = DateHelper.getStartOfToday() - DateHelper.millisecondsInOneDay;
from = to - 5 * DateHelper.millisecondsInOneDay;
assertThat(habit.repetitions.count(from, to), equalTo(3));
}
@Test
public void test_getOldest()
{
long expectedOldestTimestamp = DateHelper.getStartOfToday() - 9 * DateHelper.millisecondsInOneDay;
assertThat(habit.repetitions.getOldestTimestamp(), equalTo(expectedOldestTimestamp));
Repetition oldest = habit.repetitions.getOldest();
assertFalse(oldest == null);
assertThat(oldest.timestamp, equalTo(expectedOldestTimestamp));
}
}

View File

@@ -1,176 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.models;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.helpers.DatabaseHelper;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.models.Score;
import org.isoron.uhabits.unit.HabitFixtures;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.IOException;
import java.io.StringWriter;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class ScoreListTest extends BaseTest
{
private Habit habit;
@Before
public void setup()
{
super.setup();
HabitFixtures.purgeHabits();
habit = HabitFixtures.createEmptyHabit();
}
@After
public void tearDown()
{
DateHelper.setFixedLocalTime(null);
}
@Test
public void test_invalidateNewerThan()
{
assertThat(habit.scores.getTodayValue(), equalTo(0));
toggleRepetitions(0, 2);
assertThat(habit.scores.getTodayValue(), equalTo(1948077));
habit.freqNum = 1;
habit.freqDen = 2;
habit.scores.invalidateNewerThan(0);
assertThat(habit.scores.getTodayValue(), equalTo(1974654));
}
@Test
public void test_getTodayStarValue()
{
assertThat(habit.scores.getTodayStarStatus(), equalTo(Score.EMPTY_STAR));
int k = 0;
while(habit.scores.getTodayValue() < Score.HALF_STAR_CUTOFF) toggleRepetitions(k, ++k);
assertThat(habit.scores.getTodayStarStatus(), equalTo(Score.HALF_STAR));
while(habit.scores.getTodayValue() < Score.FULL_STAR_CUTOFF) toggleRepetitions(k, ++k);
assertThat(habit.scores.getTodayStarStatus(), equalTo(Score.FULL_STAR));
}
@Test
public void test_getTodayValue()
{
toggleRepetitions(0, 20);
assertThat(habit.scores.getTodayValue(), equalTo(12629351));
}
@Test
public void test_getValue()
{
toggleRepetitions(0, 20);
int expectedValues[] = { 12629351, 12266245, 11883254, 11479288, 11053198, 10603773,
10129735, 9629735, 9102352, 8546087, 7959357, 7340494, 6687738, 5999234, 5273023,
4507040, 3699107, 2846927, 1948077, 1000000 };
long current = DateHelper.getStartOfToday();
for(int expectedValue : expectedValues)
{
assertThat(habit.scores.getValue(current), equalTo(expectedValue));
current -= DateHelper.millisecondsInOneDay;
}
}
@Test
public void test_getAllValues_withoutGroups()
{
toggleRepetitions(0, 20);
int expectedValues[] = { 12629351, 12266245, 11883254, 11479288, 11053198, 10603773,
10129735, 9629735, 9102352, 8546087, 7959357, 7340494, 6687738, 5999234, 5273023,
4507040, 3699107, 2846927, 1948077, 1000000 };
int actualValues[] = habit.scores.getAllValues(1);
assertThat(actualValues, equalTo(expectedValues));
}
@Test
public void test_getAllValues_withGroups()
{
toggleRepetitions(0, 20);
int expectedValues[] = { 11434978, 7894999, 3212362 };
int actualValues[] = habit.scores.getAllValues(7);
assertThat(actualValues, equalTo(expectedValues));
}
@Test
public void test_writeCSV() throws IOException
{
HabitFixtures.purgeHabits();
Habit habit = HabitFixtures.createShortHabit();
String expectedCSV =
"2015-01-16,0.0519\n" +
"2015-01-17,0.1021\n" +
"2015-01-18,0.0986\n" +
"2015-01-19,0.0952\n" +
"2015-01-20,0.1439\n" +
"2015-01-21,0.1909\n" +
"2015-01-22,0.2364\n" +
"2015-01-23,0.2283\n" +
"2015-01-24,0.2205\n" +
"2015-01-25,0.2649\n";
StringWriter writer = new StringWriter();
habit.scores.writeCSV(writer);
assertThat(writer.toString(), equalTo(expectedCSV));
}
private void toggleRepetitions(final int from, final int to)
{
DatabaseHelper.executeAsTransaction(new DatabaseHelper.Command()
{
@Override
public void execute()
{
long today = DateHelper.getStartOfToday();
for (int i = from; i < to; i++)
habit.repetitions.toggle(today - i * DateHelper.millisecondsInOneDay);
}
});
}
}

View File

@@ -1,108 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.models;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.models.Checkmark;
import org.isoron.uhabits.models.Score;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class ScoreTest extends BaseTest
{
@Before
public void setup()
{
super.setup();
}
@Test
public void test_compute_withDailyHabit()
{
int checkmark = Checkmark.UNCHECKED;
assertThat(Score.compute(1, 0, checkmark), equalTo(0));
assertThat(Score.compute(1, 5000000, checkmark), equalTo(4740387));
assertThat(Score.compute(1, 10000000, checkmark), equalTo(9480775));
assertThat(Score.compute(1, Score.MAX_VALUE, checkmark), equalTo(18259478));
checkmark = Checkmark.CHECKED_IMPLICITLY;
assertThat(Score.compute(1, 0, checkmark), equalTo(0));
assertThat(Score.compute(1, 5000000, checkmark), equalTo(4740387));
assertThat(Score.compute(1, 10000000, checkmark), equalTo(9480775));
assertThat(Score.compute(1, Score.MAX_VALUE, checkmark), equalTo(18259478));
checkmark = Checkmark.CHECKED_EXPLICITLY;
assertThat(Score.compute(1, 0, checkmark), equalTo(1000000));
assertThat(Score.compute(1, 5000000, checkmark), equalTo(5740387));
assertThat(Score.compute(1, 10000000, checkmark), equalTo(10480775));
assertThat(Score.compute(1, Score.MAX_VALUE, checkmark), equalTo(Score.MAX_VALUE));
}
@Test
public void test_compute_withNonDailyHabit()
{
int checkmark = Checkmark.CHECKED_EXPLICITLY;
assertThat(Score.compute(1/3.0, 0, checkmark), equalTo(1000000));
assertThat(Score.compute(1/3.0, 5000000, checkmark), equalTo(5916180));
assertThat(Score.compute(1/3.0, 10000000, checkmark), equalTo(10832360));
assertThat(Score.compute(1/3.0, Score.MAX_VALUE, checkmark), equalTo(Score.MAX_VALUE));
assertThat(Score.compute(1/7.0, 0, checkmark), equalTo(1000000));
assertThat(Score.compute(1/7.0, 5000000, checkmark), equalTo(5964398));
assertThat(Score.compute(1/7.0, 10000000, checkmark), equalTo(10928796));
assertThat(Score.compute(1/7.0, Score.MAX_VALUE, checkmark), equalTo(Score.MAX_VALUE));
}
@Test
public void test_getStarStatus()
{
Score s = new Score();
s.score = Score.FULL_STAR_CUTOFF + 1;
assertThat(s.getStarStatus(), equalTo(Score.FULL_STAR));
s.score = Score.FULL_STAR_CUTOFF;
assertThat(s.getStarStatus(), equalTo(Score.FULL_STAR));
s.score = Score.FULL_STAR_CUTOFF - 1;
assertThat(s.getStarStatus(), equalTo(Score.HALF_STAR));
s.score = Score.HALF_STAR_CUTOFF + 1;
assertThat(s.getStarStatus(), equalTo(Score.HALF_STAR));
s.score = Score.HALF_STAR_CUTOFF;
assertThat(s.getStarStatus(), equalTo(Score.HALF_STAR));
s.score = Score.HALF_STAR_CUTOFF - 1;
assertThat(s.getStarStatus(), equalTo(Score.EMPTY_STAR));
s.score = 0;
assertThat(s.getStarStatus(), equalTo(Score.EMPTY_STAR));
}
}

View File

@@ -1,77 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.tasks;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import android.widget.ProgressBar;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.tasks.ExportCSVTask;
import org.isoron.uhabits.unit.HabitFixtures;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.File;
import java.util.List;
import static junit.framework.Assert.assertTrue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.core.IsNot.not;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class ExportCSVTaskTest extends BaseTest
{
@Before
public void setup()
{
super.setup();
}
@Test
public void testExportCSV() throws Throwable
{
HabitFixtures.createShortHabit();
List<Habit> habits = Habit.getAll(true);
ProgressBar bar = new ProgressBar(targetContext);
ExportCSVTask task = new ExportCSVTask(habits, bar);
task.setListener(new ExportCSVTask.Listener()
{
@Override
public void onExportCSVFinished(String archiveFilename)
{
assertThat(archiveFilename, is(not(nullValue())));
File f = new File(archiveFilename);
assertTrue(f.exists());
assertTrue(f.canRead());
}
});
task.execute();
waitForAsyncTasks();
}
}

View File

@@ -1,75 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.tasks;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import android.widget.ProgressBar;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.tasks.ExportDBTask;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.File;
import static junit.framework.Assert.assertTrue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.core.IsNot.not;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class ExportDBTaskTest extends BaseTest
{
@Before
public void setup()
{
super.setup();
}
@Test
public void testExportCSV() throws Throwable
{
Context context = InstrumentationRegistry.getContext();
ProgressBar bar = new ProgressBar(context);
ExportDBTask task = new ExportDBTask(bar);
task.setListener(new ExportDBTask.Listener()
{
@Override
public void onExportDBFinished(String filename)
{
assertThat(filename, is(not(nullValue())));
File f = new File(filename);
assertTrue(f.exists());
assertTrue(f.canRead());
}
});
task.execute();
waitForAsyncTasks();
}
}

View File

@@ -1,101 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.tasks;
import android.support.annotation.NonNull;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import android.widget.ProgressBar;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.helpers.DatabaseHelper;
import org.isoron.uhabits.tasks.ImportDataTask;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.fail;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class ImportDataTaskTest extends BaseTest
{
private File baseDir;
@Before
public void setup()
{
super.setup();
baseDir = DatabaseHelper.getFilesDir("Backups");
if(baseDir == null) fail("baseDir should not be null");
}
private void copyAssetToFile(String assetPath, File dst) throws IOException
{
InputStream in = testContext.getAssets().open(assetPath);
DatabaseHelper.copy(in, dst);
}
private void assertTaskResult(final int expectedResult, String assetFilename) throws Throwable
{
ImportDataTask task = createTask(assetFilename);
task.setListener(new ImportDataTask.Listener()
{
@Override
public void onImportFinished(int result)
{
assertThat(result, equalTo(expectedResult));
}
});
task.execute();
waitForAsyncTasks();
}
@NonNull
private ImportDataTask createTask(String assetFilename) throws IOException
{
ProgressBar bar = new ProgressBar(targetContext);
File file = new File(String.format("%s/%s", baseDir.getPath(), assetFilename));
copyAssetToFile(assetFilename, file);
return new ImportDataTask(file, bar);
}
@Test
public void testImportInvalidData() throws Throwable
{
assertTaskResult(ImportDataTask.NOT_RECOGNIZED, "icon.png");
}
@Test
public void testImportValidData() throws Throwable
{
assertTaskResult(ImportDataTask.SUCCESS, "loop.db");
}
}

View File

@@ -1,91 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.views;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.R;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.helpers.UIHelper;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.isoron.uhabits.views.CheckmarkWidgetView;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.IOException;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class CheckmarkWidgetViewTest extends ViewTest
{
private CheckmarkWidgetView view;
private Habit habit;
@Before
public void setup()
{
super.setup();
UIHelper.setFixedTheme(R.style.TransparentWidgetTheme);
habit = HabitFixtures.createShortHabit();
view = new CheckmarkWidgetView(targetContext);
view.setHabit(habit);
refreshData(view);
measureView(dpToPixels(100), dpToPixels(200), view);
}
@Test
public void testRender_checked() throws IOException
{
assertRenders(view, "CheckmarkView/checked.png");
}
@Test
public void testRender_unchecked() throws IOException
{
habit.repetitions.toggle(DateHelper.getStartOfToday());
view.refreshData();
assertRenders(view, "CheckmarkView/unchecked.png");
}
@Test
public void testRender_implicitlyChecked() throws IOException
{
long today = DateHelper.getStartOfToday();
long day = DateHelper.millisecondsInOneDay;
habit.repetitions.toggle(today);
habit.repetitions.toggle(today - day);
habit.repetitions.toggle(today - 2 * day);
view.refreshData();
assertRenders(view, "CheckmarkView/implicitly_checked.png");
}
@Test
public void testRender_largeSize() throws IOException
{
measureView(dpToPixels(300), dpToPixels(300), view);
assertRenders(view, "CheckmarkView/large_size.png");
}
}

View File

@@ -1,80 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.views;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.isoron.uhabits.views.HabitFrequencyView;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class HabitFrequencyViewTest extends ViewTest
{
private HabitFrequencyView view;
@Before
public void setup()
{
super.setup();
HabitFixtures.purgeHabits();
Habit habit = HabitFixtures.createLongHabit();
view = new HabitFrequencyView(targetContext);
view.setHabit(habit);
refreshData(view);
measureView(dpToPixels(300), dpToPixels(100), view);
}
@Test
public void testRender() throws Throwable
{
assertRenders(view, "HabitFrequencyView/render.png");
}
@Test
public void testRender_withTransparentBackground() throws Throwable
{
view.setIsBackgroundTransparent(true);
assertRenders(view, "HabitFrequencyView/renderTransparent.png");
}
@Test
public void testRender_withDifferentSize() throws Throwable
{
measureView(dpToPixels(200), dpToPixels(200), view);
assertRenders(view, "HabitFrequencyView/renderDifferentSize.png");
}
@Test
public void testRender_withDataOffset() throws Throwable
{
view.onScroll(null, null, -dpToPixels(150), 0);
view.invalidate();
assertRenders(view, "HabitFrequencyView/renderDataOffset.png");
}
}

View File

@@ -1,125 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.views;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.isoron.uhabits.views.HabitHistoryView;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class HabitHistoryViewTest extends ViewTest
{
private Habit habit;
private HabitHistoryView view;
@Before
public void setup()
{
super.setup();
HabitFixtures.purgeHabits();
habit = HabitFixtures.createLongHabit();
view = new HabitHistoryView(targetContext);
view.setHabit(habit);
measureView(dpToPixels(400), dpToPixels(200), view);
refreshData(view);
}
@Test
public void testRender() throws Throwable
{
assertRenders(view, "HabitHistoryView/render.png");
}
@Test
public void testRender_withTransparentBackground() throws Throwable
{
view.setIsBackgroundTransparent(true);
assertRenders(view, "HabitHistoryView/renderTransparent.png");
}
@Test
public void testRender_withDifferentSize() throws Throwable
{
measureView(dpToPixels(200), dpToPixels(200), view);
assertRenders(view, "HabitHistoryView/renderDifferentSize.png");
}
@Test
public void testRender_withDataOffset() throws Throwable
{
view.onScroll(null, null, -dpToPixels(150), 0);
view.invalidate();
assertRenders(view, "HabitHistoryView/renderDataOffset.png");
}
@Test
public void tapDate_withEditableView() throws Throwable
{
view.setIsEditable(true);
tap(view, 340, 40); // today's square
waitForAsyncTasks();
long today = DateHelper.getStartOfToday();
assertFalse(habit.repetitions.contains(today));
}
@Test
public void tapDate_atInvalidLocations() throws Throwable
{
int expectedCheckmarkValues[] = habit.checkmarks.getAllValues();
view.setIsEditable(true);
tap(view, 118, 13); // header
tap(view, 336, 60); // tomorrow's square
tap(view, 370, 60); // right axis
waitForAsyncTasks();
int actualCheckmarkValues[] = habit.checkmarks.getAllValues();
assertThat(actualCheckmarkValues, equalTo(expectedCheckmarkValues));
}
@Test
public void tapDate_withReadOnlyView() throws Throwable
{
view.setIsEditable(false);
tap(view, 340, 40); // today's square
waitForAsyncTasks();
long today = DateHelper.getStartOfToday();
assertTrue(habit.repetitions.contains(today));
}
}

View File

@@ -1,104 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.views;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import android.util.Log;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.isoron.uhabits.views.HabitScoreView;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class HabitScoreViewTest extends ViewTest
{
private Habit habit;
private HabitScoreView view;
@Before
public void setup()
{
super.setup();
HabitFixtures.purgeHabits();
habit = HabitFixtures.createLongHabit();
view = new HabitScoreView(targetContext);
view.setHabit(habit);
view.setBucketSize(7);
refreshData(view);
measureView(dpToPixels(300), dpToPixels(200), view);
}
@Test
public void testRender() throws Throwable
{
Log.d("HabitScoreViewTest", String.format("height=%d", dpToPixels(100)));
assertRenders(view, "HabitScoreView/render.png");
}
@Test
public void testRender_withTransparentBackground() throws Throwable
{
view.setIsTransparencyEnabled(true);
assertRenders(view, "HabitScoreView/renderTransparent.png");
}
@Test
public void testRender_withDifferentSize() throws Throwable
{
measureView(dpToPixels(200), dpToPixels(200), view);
assertRenders(view, "HabitScoreView/renderDifferentSize.png");
}
@Test
public void testRender_withDataOffset() throws Throwable
{
view.onScroll(null, null, -dpToPixels(150), 0);
view.invalidate();
assertRenders(view, "HabitScoreView/renderDataOffset.png");
}
@Test
public void testRender_withMonthlyBucket() throws Throwable
{
view.setBucketSize(30);
view.refreshData();
view.invalidate();
assertRenders(view, "HabitScoreView/renderMonthly.png");
}
@Test
public void testRender_withYearlyBucket() throws Throwable
{
view.setBucketSize(365);
view.refreshData();
view.invalidate();
assertRenders(view, "HabitScoreView/renderYearly.png");
}
}

View File

@@ -1,74 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.views;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.unit.HabitFixtures;
import org.isoron.uhabits.views.HabitStreakView;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class HabitStreakViewTest extends ViewTest
{
private HabitStreakView view;
@Before
public void setup()
{
super.setup();
HabitFixtures.purgeHabits();
Habit habit = HabitFixtures.createLongHabit();
view = new HabitStreakView(targetContext);
measureView(dpToPixels(300), dpToPixels(100), view);
view.setHabit(habit);
refreshData(view);
}
@Test
public void testRender() throws Throwable
{
assertRenders(view, "HabitStreakView/render.png");
}
@Test
public void testRender_withTransparentBackground() throws Throwable
{
view.setIsBackgroundTransparent(true);
assertRenders(view, "HabitStreakView/renderTransparent.png");
}
@Test
public void testRender_withSmallSize() throws Throwable
{
measureView(dpToPixels(100), dpToPixels(100), view);
refreshData(view);
assertRenders(view, "HabitStreakView/renderSmallSize.png");
}
}

View File

@@ -1,77 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.views;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.R;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.views.NumberView;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.IOException;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class NumberViewTest extends ViewTest
{
private NumberView view;
@Before
public void setup()
{
super.setup();
view = new NumberView(targetContext);
view.setLabel("Hello world");
view.setNumber(31);
view.setColor(ColorHelper.CSV_PALETTE[0]);
measureView(dpToPixels(100), dpToPixels(100), view);
}
@Test
public void testRender_base() throws IOException
{
assertRenders(view, "NumberView/render.png");
}
@Test
public void testRender_withLongLabel() throws IOException
{
view.setLabel("The quick brown fox jumps over the lazy fox");
measureView(dpToPixels(100), dpToPixels(100), view);
assertRenders(view, "NumberView/renderLongLabel.png");
}
@Test
public void testRender_withDifferentParams() throws IOException
{
view.setNumber(500);
view.setColor(ColorHelper.CSV_PALETTE[5]);
view.setTextSize(targetContext.getResources().getDimension(R.dimen.tinyTextSize));
measureView(dpToPixels(200), dpToPixels(200), view);
assertRenders(view, "NumberView/renderDifferentParams.png");
}
}

View File

@@ -1,69 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.views;
import android.graphics.Color;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.views.RingView;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.IOException;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class RingViewTest extends ViewTest
{
private RingView view;
@Before
public void setup()
{
super.setup();
view = new RingView(targetContext);
view.setPercentage(0.6f);
view.setText("60%");
view.setColor(ColorHelper.CSV_PALETTE[0]);
view.setBackgroundColor(Color.WHITE);
view.setThickness(dpToPixels(3));
}
@Test
public void testRender_base() throws IOException
{
measureView(dpToPixels(100), dpToPixels(100), view);
assertRenders(view, "RingView/render.png");
}
@Test
public void testRender_withDifferentParams() throws IOException
{
view.setPercentage(0.25f);
view.setColor(ColorHelper.CSV_PALETTE[5]);
measureView(dpToPixels(200), dpToPixels(200), view);
assertRenders(view, "RingView/renderDifferentParams.png");
}
}

View File

@@ -1,226 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.unit.views;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.SystemClock;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import org.isoron.uhabits.BaseTest;
import org.isoron.uhabits.helpers.DatabaseHelper;
import org.isoron.uhabits.helpers.UIHelper;
import org.isoron.uhabits.tasks.BaseTask;
import org.isoron.uhabits.views.HabitDataView;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import static junit.framework.Assert.fail;
public class ViewTest extends BaseTest
{
protected static final double SIMILARITY_CUTOFF = 0.09;
public static final int HISTOGRAM_BIN_SIZE = 8;
protected void measureView(int width, int height, View view)
{
int specWidth = View.MeasureSpec.makeMeasureSpec(width, View.MeasureSpec.EXACTLY);
int specHeight = View.MeasureSpec.makeMeasureSpec(height, View.MeasureSpec.EXACTLY);
view.measure(specWidth, specHeight);
view.layout(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight());
}
protected void assertRenders(View view, String expectedImagePath) throws IOException
{
StringBuilder errorMessage = new StringBuilder();
expectedImagePath = getVersionedViewAssetPath(expectedImagePath);
view.setDrawingCacheEnabled(true);
view.buildDrawingCache();
Bitmap actual = view.getDrawingCache();
Bitmap expected = getBitmapFromAssets(expectedImagePath);
int width = actual.getWidth();
int height = actual.getHeight();
Bitmap scaledExpected = Bitmap.createScaledBitmap(expected, width, height, true);
double distance;
boolean similarEnough = true;
if ((distance = compareHistograms(getHistogram(actual), getHistogram(scaledExpected))) > SIMILARITY_CUTOFF)
{
similarEnough = false;
errorMessage.append(String.format(
"Rendered image has wrong histogram (distance=%f). ",
distance));
}
if(!similarEnough)
{
saveBitmap(expectedImagePath, ".expected", scaledExpected);
String path = saveBitmap(expectedImagePath, "", actual);
errorMessage.append(String.format("Actual rendered image " + "saved to %s", path));
fail(errorMessage.toString());
}
actual.recycle();
expected.recycle();
scaledExpected.recycle();
}
private Bitmap getBitmapFromAssets(String path) throws IOException
{
InputStream stream = testContext.getAssets().open(path);
return BitmapFactory.decodeStream(stream);
}
private String getVersionedViewAssetPath(String path)
{
String result = null;
if (android.os.Build.VERSION.SDK_INT >= 21)
{
try
{
String vpath = "views-v21/" + path;
testContext.getAssets().open(vpath);
result = vpath;
}
catch (IOException e)
{
// ignored
}
}
if(result == null)
result = "views/" + path;
return result;
}
private String saveBitmap(String filename, String suffix, Bitmap bitmap)
throws IOException
{
File dir = DatabaseHelper.getSDCardDir("test-screenshots");
if(dir == null) dir = DatabaseHelper.getFilesDir("test-screenshots");
if(dir == null) throw new RuntimeException("Could not find suitable dir for screenshots");
filename = filename.replaceAll("\\.png$", suffix + ".png");
String absolutePath = String.format("%s/%s", dir.getAbsolutePath(), filename);
File parent = new File(absolutePath).getParentFile();
if(!parent.exists() && !parent.mkdirs())
throw new RuntimeException(String.format("Could not create dir: %s",
parent.getAbsolutePath()));
FileOutputStream out = new FileOutputStream(absolutePath);
bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
return absolutePath;
}
private int[][] getHistogram(Bitmap bitmap)
{
int histogram[][] = new int[4][256 / HISTOGRAM_BIN_SIZE];
for(int x = 0; x < bitmap.getWidth(); x++)
{
for(int y = 0; y < bitmap.getHeight(); y++)
{
int color = bitmap.getPixel(x, y);
int[] argb = new int[]{
(color >> 24) & 0xff, //alpha
(color >> 16) & 0xff, //red
(color >> 8) & 0xff, //green
(color ) & 0xff //blue
};
histogram[0][argb[0] / HISTOGRAM_BIN_SIZE]++;
histogram[1][argb[1] / HISTOGRAM_BIN_SIZE]++;
histogram[2][argb[2] / HISTOGRAM_BIN_SIZE]++;
histogram[3][argb[3] / HISTOGRAM_BIN_SIZE]++;
}
}
return histogram;
}
private double compareHistograms(int[][] actualHistogram, int[][] expectedHistogram)
{
long diff = 0;
long total = 0;
for(int i = 0; i < 256 / HISTOGRAM_BIN_SIZE; i ++)
{
diff += Math.abs(actualHistogram[0][i] - expectedHistogram[0][i]);
diff += Math.abs(actualHistogram[1][i] - expectedHistogram[1][i]);
diff += Math.abs(actualHistogram[2][i] - expectedHistogram[2][i]);
diff += Math.abs(actualHistogram[3][i] - expectedHistogram[3][i]);
total += actualHistogram[0][i];
total += actualHistogram[1][i];
total += actualHistogram[2][i];
total += actualHistogram[3][i];
}
return (double) diff / total / 2;
}
protected int dpToPixels(int dp)
{
return (int) UIHelper.dpToPixels(targetContext, dp);
}
protected void tap(GestureDetector.OnGestureListener view, int x, int y) throws InterruptedException
{
long now = SystemClock.uptimeMillis();
MotionEvent e = MotionEvent.obtain(now, now, MotionEvent.ACTION_UP, dpToPixels(x),
dpToPixels(y), 0);
view.onSingleTapUp(e);
e.recycle();
}
protected void refreshData(final HabitDataView view)
{
new BaseTask()
{
@Override
protected void doInBackground()
{
view.refreshData();
}
}.execute();
try
{
waitForAsyncTasks();
}
catch (Exception e)
{
throw new RuntimeException("Time out");
}
}
}

View File

@@ -1,39 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
~
~ This file is part of Loop Habit Tracker.
~
~ Loop Habit Tracker is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by the
~ Free Software Foundation, either version 3 of the License, or (at your
~ option) any later version.
~
~ Loop Habit Tracker is distributed in the hope that it will be useful, but
~ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~
~ You should have received a copy of the GNU General Public License along
~ with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<manifest
package="org.isoron.uhabits"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.SET_ANIMATION_SCALE"/>
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
tools:replace="maxSdkVersion"
android:maxSdkVersion="99" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
tools:replace="maxSdkVersion"
android:maxSdkVersion="99" />
</manifest>

View File

@@ -1,167 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
~
~ This file is part of Loop Habit Tracker.
~
~ Loop Habit Tracker is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by the
~ Free Software Foundation, either version 3 of the License, or (at your
~ option) any later version.
~
~ Loop Habit Tracker is distributed in the hope that it will be useful, but
~ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~
~ You should have received a copy of the GNU General Public License along
~ with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<manifest
package="org.isoron.uhabits"
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="18"
android:versionName="1.5.2">
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:name="HabitsApplication"
android:allowBackup="true"
android:backupAgent=".HabitsBackupAgent"
android:icon="@mipmap/ic_launcher"
android:label="@string/main_activity_title"
android:theme="@style/AppBaseTheme"
android:supportsRtl="true">
<meta-data
android:name="com.google.android.backup.api_key"
android:value="AEdPqrEAAAAI6aeWncbnMNo8E5GWeZ44dlc5cQ7tCROwFhOtiw"/>
<activity
android:name=".MainActivity"
android:label="@string/main_activity_title">
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".ShowHabitActivity"
android:label="@string/title_activity_show_habit">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.isoron.uhabits.MainActivity"/>
</activity>
<activity
android:name=".SettingsActivity"
android:label="@string/settings">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.isoron.uhabits.MainActivity"/>
</activity>
<activity
android:name=".IntroActivity"
android:label=""
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
<activity
android:name=".widgets.HabitPickerDialog"
android:theme="@style/Theme.AppCompat.Light.Dialog">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/>
</intent-filter>
</activity>
<activity
android:name=".AboutActivity"
android:label="@string/about">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<receiver
android:name=".widgets.CheckmarkWidgetProvider"
android:label="@string/checkmark">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_checkmark_info"/>
</receiver>
<receiver
android:name=".widgets.HistoryWidgetProvider"
android:label="@string/history">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_history_info"/>
</receiver>
<receiver
android:name=".widgets.ScoreWidgetProvider"
android:label="@string/habit_strength">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_score_info"/>
</receiver>
<receiver
android:name=".widgets.StreakWidgetProvider"
android:label="@string/streaks">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_streak_info"/>
</receiver>
<receiver
android:name=".widgets.FrequencyWidgetProvider"
android:label="@string/frequency">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_frequency_info"/>
</receiver>
<receiver android:name=".HabitBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</application>
</manifest>

View File

@@ -1 +0,0 @@
alter table habits add column reminder_days integer not null default 127;

View File

@@ -1,4 +0,0 @@
create index idx_score_habit_timestamp on score(habit, timestamp);
create index idx_checkmark_habit_timestamp on checkmarks(habit, timestamp);
create index idx_repetitions_habit_timestamp on repetitions(habit, timestamp);
create index idx_streak_habit_end on streak(habit, end);

View File

@@ -1,2 +0,0 @@
alter table habits add column reminder_hour integer;
alter table habits add column reminder_min integer;

View File

@@ -1 +0,0 @@
alter table habits add column highlight integer not null default 0;

View File

@@ -1 +0,0 @@
alter table habits add column archived integer not null default 0;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -1,89 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import org.isoron.uhabits.helpers.UIHelper;
public class AboutActivity extends BaseActivity implements View.OnClickListener
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.about);
setupSupportActionBar(true);
int color = UIHelper.getStyledColor(this, R.attr.aboutScreenColor);
setupActionBarColor(color);
TextView tvVersion = (TextView) findViewById(R.id.tvVersion);
TextView tvRate = (TextView) findViewById(R.id.tvRate);
TextView tvFeedback = (TextView) findViewById(R.id.tvFeedback);
TextView tvSource = (TextView) findViewById(R.id.tvSource);
tvVersion.setText(String.format(getResources().getString(R.string.version_n),
BuildConfig.VERSION_NAME));
tvRate.setOnClickListener(this);
tvFeedback.setOnClickListener(this);
tvSource.setOnClickListener(this);
}
@Override
public void onClick(View v)
{
switch (v.getId())
{
case R.id.tvRate:
{
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse(getString(R.string.playStoreURL)));
startActivity(intent);
break;
}
case R.id.tvFeedback:
{
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SENDTO);
intent.setData(Uri.parse(getString(R.string.feedbackURL)));
startActivity(intent);
break;
}
case R.id.tvSource:
{
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse(getString(R.string.sourceCodeURL)));
startActivity(intent);
break;
}
}
}
}

View File

@@ -1,204 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits;
import android.app.backup.BackupManager;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.Toast;
import org.isoron.uhabits.commands.Command;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.helpers.UIHelper;
import java.util.LinkedList;
abstract public class BaseActivity extends AppCompatActivity implements Thread.UncaughtExceptionHandler
{
private static int MAX_UNDO_LEVEL = 15;
private LinkedList<Command> undoList;
private LinkedList<Command> redoList;
private Toast toast;
Thread.UncaughtExceptionHandler androidExceptionHandler;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
UIHelper.applyCurrentTheme(this);
androidExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
Thread.setDefaultUncaughtExceptionHandler(this);
undoList = new LinkedList<>();
redoList = new LinkedList<>();
}
public void executeCommand(Command command, Long refreshKey)
{
executeCommand(command, false, refreshKey);
}
protected void undo()
{
if (undoList.isEmpty())
{
showToast(R.string.toast_nothing_to_undo);
return;
}
Command last = undoList.pop();
redoList.push(last);
last.undo();
showToast(last.getUndoStringId());
}
protected void redo()
{
if (redoList.isEmpty())
{
showToast(R.string.toast_nothing_to_redo);
return;
}
Command last = redoList.pop();
executeCommand(last, false, null);
}
public void showToast(Integer stringId)
{
if (stringId == null) return;
if (toast == null) toast = Toast.makeText(this, stringId, Toast.LENGTH_SHORT);
else toast.setText(stringId);
toast.show();
}
public void executeCommand(final Command command, Boolean clearRedoStack, final Long refreshKey)
{
undoList.push(command);
if (undoList.size() > MAX_UNDO_LEVEL) undoList.removeLast();
if (clearRedoStack) redoList.clear();
new AsyncTask<Void, Void, Void>()
{
@Override
protected Void doInBackground(Void... params)
{
command.execute();
return null;
}
@Override
protected void onPostExecute(Void aVoid)
{
BaseActivity.this.onPostExecuteCommand(refreshKey);
BackupManager.dataChanged("org.isoron.uhabits");
}
}.execute();
showToast(command.getExecuteStringId());
}
protected void setupSupportActionBar(boolean homeButtonEnabled)
{
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
if(toolbar == null) return;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
toolbar.setElevation(UIHelper.dpToPixels(this, 2));
setSupportActionBar(toolbar);
ActionBar actionBar = getSupportActionBar();
if(actionBar == null) return;
if(homeButtonEnabled)
actionBar.setDisplayHomeAsUpEnabled(true);
}
public void onPostExecuteCommand(Long refreshKey)
{
}
@Override
public void uncaughtException(Thread thread, Throwable ex)
{
try
{
ex.printStackTrace();
HabitsApplication.dumpBugReportToFile();
}
catch(Exception e)
{
// ignored
}
if(androidExceptionHandler != null)
androidExceptionHandler.uncaughtException(thread, ex);
else
System.exit(1);
}
protected void setupActionBarColor(int color)
{
ActionBar actionBar = getSupportActionBar();
if(actionBar == null) return;
if (!UIHelper.getStyledBoolean(this, R.attr.useHabitColorAsPrimary)) return;
ColorDrawable drawable = new ColorDrawable(color);
actionBar.setBackgroundDrawable(drawable);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
{
int darkerColor = ColorHelper.mixColors(color, Color.BLACK, 0.75f);
getWindow().setStatusBarColor(darkerColor);
}
}
@Override
protected void onPostResume()
{
super.onPostResume();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
hideFakeToolbarShadow();
}
protected void hideFakeToolbarShadow()
{
View view = findViewById(R.id.toolbarShadow);
if(view != null) view.setVisibility(View.GONE);
view = findViewById(R.id.headerShadow);
if(view != null) view.setVisibility(View.GONE);
}
}

View File

@@ -1,274 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits;
import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.ContentUris;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Handler;
import android.preference.PreferenceManager;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.TaskStackBuilder;
import android.support.v4.content.LocalBroadcastManager;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.helpers.ReminderHelper;
import org.isoron.uhabits.models.Checkmark;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.tasks.BaseTask;
import java.util.Date;
public class HabitBroadcastReceiver extends BroadcastReceiver
{
public static final String ACTION_CHECK = "org.isoron.uhabits.ACTION_CHECK";
public static final String ACTION_DISMISS = "org.isoron.uhabits.ACTION_DISMISS";
public static final String ACTION_SHOW_REMINDER = "org.isoron.uhabits.ACTION_SHOW_REMINDER";
public static final String ACTION_SNOOZE = "org.isoron.uhabits.ACTION_SNOOZE";
@Override
public void onReceive(final Context context, Intent intent)
{
switch (intent.getAction())
{
case ACTION_SHOW_REMINDER:
createNotification(context, intent);
createReminderAlarmsDelayed(context);
break;
case ACTION_DISMISS:
dismissAllHabits();
break;
case ACTION_CHECK:
checkHabit(context, intent);
break;
case ACTION_SNOOZE:
snoozeHabit(context, intent);
break;
case Intent.ACTION_BOOT_COMPLETED:
ReminderHelper.createReminderAlarms(context);
break;
}
}
private void createReminderAlarmsDelayed(final Context context)
{
new Handler().postDelayed(new Runnable()
{
@Override
public void run()
{
ReminderHelper.createReminderAlarms(context);
}
}, 5000);
}
private void snoozeHabit(Context context, Intent intent)
{
Uri data = intent.getData();
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
long delayMinutes = Long.parseLong(prefs.getString("pref_snooze_interval", "15"));
long habitId = ContentUris.parseId(data);
Habit habit = Habit.get(habitId);
if(habit != null)
ReminderHelper.createReminderAlarm(context, habit,
new Date().getTime() + delayMinutes * 60 * 1000);
dismissNotification(context, habitId);
}
private void checkHabit(Context context, Intent intent)
{
Uri data = intent.getData();
Long timestamp = intent.getLongExtra("timestamp", DateHelper.getStartOfToday());
long habitId = ContentUris.parseId(data);
Habit habit = Habit.get(habitId);
if(habit != null)
habit.repetitions.toggle(timestamp);
dismissNotification(context, habitId);
sendRefreshBroadcast(context);
}
public static void sendRefreshBroadcast(Context context)
{
LocalBroadcastManager manager = LocalBroadcastManager.getInstance(context);
Intent refreshIntent = new Intent(MainActivity.ACTION_REFRESH);
manager.sendBroadcast(refreshIntent);
MainActivity.updateWidgets(context);
}
private void dismissAllHabits()
{
}
private void dismissNotification(Context context, Long habitId)
{
NotificationManager notificationManager =
(NotificationManager) context.getSystemService(Activity.NOTIFICATION_SERVICE);
int notificationId = (int) (habitId % Integer.MAX_VALUE);
notificationManager.cancel(notificationId);
}
private void createNotification(final Context context, final Intent intent)
{
final Uri data = intent.getData();
final Habit habit = Habit.get(ContentUris.parseId(data));
final Long timestamp = intent.getLongExtra("timestamp", DateHelper.getStartOfToday());
final Long reminderTime = intent.getLongExtra("reminderTime", DateHelper.getStartOfToday());
if (habit == null) return;
new BaseTask()
{
int todayValue;
@Override
protected void doInBackground()
{
todayValue = habit.checkmarks.getTodayValue();
}
@Override
protected void onPostExecute(Void aVoid)
{
if (todayValue != Checkmark.UNCHECKED) return;
if (!checkWeekday(intent, habit)) return;
if (!habit.hasReminder()) return;
Intent contentIntent = new Intent(context, MainActivity.class);
contentIntent.setData(data);
PendingIntent contentPendingIntent =
PendingIntent.getActivity(context, 0, contentIntent, 0);
PendingIntent dismissPendingIntent = buildDismissIntent(context);
PendingIntent checkIntentPending = buildCheckIntent(context, habit, timestamp);
PendingIntent snoozeIntentPending = buildSnoozeIntent(context, habit);
Uri ringtoneUri = ReminderHelper.getRingtoneUri(context);
NotificationCompat.WearableExtender wearableExtender =
new NotificationCompat.WearableExtender().setBackground(
BitmapFactory.decodeResource(context.getResources(),
R.drawable.stripe));
Notification notification =
new NotificationCompat.Builder(context)
.setSmallIcon(R.drawable.ic_notification)
.setContentTitle(habit.name)
.setContentText(habit.description)
.setContentIntent(contentPendingIntent)
.setDeleteIntent(dismissPendingIntent)
.addAction(R.drawable.ic_action_check,
context.getString(R.string.check), checkIntentPending)
.addAction(R.drawable.ic_action_snooze,
context.getString(R.string.snooze), snoozeIntentPending)
.setSound(ringtoneUri)
.extend(wearableExtender)
.setWhen(reminderTime)
.setShowWhen(true)
.build();
notification.flags |= Notification.FLAG_AUTO_CANCEL;
NotificationManager notificationManager =
(NotificationManager) context.getSystemService(
Activity.NOTIFICATION_SERVICE);
int notificationId = (int) (habit.getId() % Integer.MAX_VALUE);
notificationManager.notify(notificationId, notification);
super.onPostExecute(aVoid);
}
}.execute();
}
public static PendingIntent buildSnoozeIntent(Context context, Habit habit)
{
Uri data = habit.getUri();
Intent snoozeIntent = new Intent(context, HabitBroadcastReceiver.class);
snoozeIntent.setData(data);
snoozeIntent.setAction(ACTION_SNOOZE);
return PendingIntent.getBroadcast(context, 0, snoozeIntent, 0);
}
public static PendingIntent buildCheckIntent(Context context, Habit habit, Long timestamp)
{
Uri data = habit.getUri();
Intent checkIntent = new Intent(context, HabitBroadcastReceiver.class);
checkIntent.setData(data);
checkIntent.setAction(ACTION_CHECK);
if(timestamp != null) checkIntent.putExtra("timestamp", timestamp);
return PendingIntent.getBroadcast(context, 0, checkIntent, PendingIntent.FLAG_ONE_SHOT);
}
public static PendingIntent buildDismissIntent(Context context)
{
Intent deleteIntent = new Intent(context, HabitBroadcastReceiver.class);
deleteIntent.setAction(ACTION_DISMISS);
return PendingIntent.getBroadcast(context, 0, deleteIntent, 0);
}
public static PendingIntent buildViewHabitIntent(Context context, Habit habit)
{
Intent intent = new Intent(context, ShowHabitActivity.class);
intent.setData(Uri.parse("content://org.isoron.uhabits/habit/" + habit.getId()));
return TaskStackBuilder.create(context.getApplicationContext())
.addNextIntentWithParentStack(intent)
.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);
}
private boolean checkWeekday(Intent intent, Habit habit)
{
Long timestamp = intent.getLongExtra("timestamp", DateHelper.getStartOfToday());
boolean reminderDays[] = DateHelper.unpackWeekdayList(habit.reminderDays);
int weekday = DateHelper.getWeekday(timestamp);
return reminderDays[weekday];
}
public static void dismissNotification(Context context, Habit habit)
{
NotificationManager notificationManager =
(NotificationManager) context.getSystemService(
Activity.NOTIFICATION_SERVICE);
int notificationId = (int) (habit.getId() % Integer.MAX_VALUE);
notificationManager.cancel(notificationId);
}
}

View File

@@ -1,166 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits;
import android.app.Application;
import android.content.Context;
import android.os.Environment;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.WindowManager;
import com.activeandroid.ActiveAndroid;
import org.isoron.uhabits.helpers.DatabaseHelper;
import org.isoron.uhabits.helpers.DateHelper;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.LinkedList;
public class HabitsApplication extends Application
{
@Nullable
private static Context context;
public static boolean isTestMode()
{
try
{
if(context != null)
context.getClassLoader().loadClass("org.isoron.uhabits.unit.models.HabitTest");
return true;
}
catch (final Exception e)
{
return false;
}
}
@Nullable
public static Context getContext()
{
return context;
}
@Override
public void onCreate()
{
super.onCreate();
HabitsApplication.context = this;
if (isTestMode())
{
File db = DatabaseHelper.getDatabaseFile();
if(db.exists()) db.delete();
}
DatabaseHelper.initializeActiveAndroid();
}
@Override
public void onTerminate()
{
HabitsApplication.context = null;
ActiveAndroid.dispose();
super.onTerminate();
}
public static String getLogcat() throws IOException
{
int maxNLines = 250;
StringBuilder builder = new StringBuilder();
String[] command = new String[] { "logcat", "-d"};
Process process = Runtime.getRuntime().exec(command);
InputStreamReader in = new InputStreamReader(process.getInputStream());
BufferedReader bufferedReader = new BufferedReader(in);
LinkedList<String> log = new LinkedList<>();
String line;
while ((line = bufferedReader.readLine()) != null)
{
log.addLast(line);
if(log.size() > maxNLines) log.removeFirst();
}
for(String l : log)
{
builder.append(l);
builder.append('\n');
}
return builder.toString();
}
public static String getDeviceInfo()
{
if(context == null) return "";
StringBuilder b = new StringBuilder();
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
b.append(String.format("App Version Name: %s\n", BuildConfig.VERSION_NAME));
b.append(String.format("App Version Code: %s\n", BuildConfig.VERSION_CODE));
b.append(String.format("OS Version: %s (%s)\n", System.getProperty("os.version"),
android.os.Build.VERSION.INCREMENTAL));
b.append(String.format("OS API Level: %s\n", android.os.Build.VERSION.SDK));
b.append(String.format("Device: %s\n", android.os.Build.DEVICE));
b.append(String.format("Model (Product): %s (%s)\n", android.os.Build.MODEL,
android.os.Build.PRODUCT));
b.append(String.format("Manufacturer: %s\n", android.os.Build.MANUFACTURER));
b.append(String.format("Other tags: %s\n", android.os.Build.TAGS));
b.append(String.format("Screen Width: %s\n", wm.getDefaultDisplay().getWidth()));
b.append(String.format("Screen Height: %s\n", wm.getDefaultDisplay().getHeight()));
b.append(String.format("SD Card state: %s\n\n", Environment.getExternalStorageState()));
return b.toString();
}
@NonNull
public static File dumpBugReportToFile() throws IOException
{
String date = DateHelper.getBackupDateFormat().format(DateHelper.getLocalTime());
if(context == null) throw new RuntimeException("application context should not be null");
File dir = DatabaseHelper.getFilesDir("Logs");
if (dir == null) throw new IOException("log dir should not be null");
File logFile = new File(String.format("%s/Log %s.txt", dir.getPath(), date));
FileWriter output = new FileWriter(logFile);
output.write(generateBugReport());
output.close();
return logFile;
}
@NonNull
public static String generateBugReport() throws IOException
{
String logcat = getLogcat();
String deviceInfo = getDeviceInfo();
return deviceInfo + "\n" + logcat;
}
}

View File

@@ -1,63 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits;
import android.graphics.Color;
import android.os.Bundle;
import com.github.paolorotolo.appintro.AppIntro2;
import com.github.paolorotolo.appintro.AppIntroFragment;
public class IntroActivity extends AppIntro2
{
@Override
public void init(Bundle savedInstanceState)
{
showStatusBar(false);
addSlide(AppIntroFragment.newInstance(getString(R.string.intro_title_1),
getString(R.string.intro_description_1), R.drawable.intro_icon_1,
Color.parseColor("#194673")));
addSlide(AppIntroFragment.newInstance(getString(R.string.intro_title_2),
getString(R.string.intro_description_2), R.drawable.intro_icon_2,
Color.parseColor("#ffa726")));
addSlide(AppIntroFragment.newInstance(getString(R.string.intro_title_4),
getString(R.string.intro_description_4), R.drawable.intro_icon_4,
Color.parseColor("#9575cd")));
}
@Override
public void onNextPressed()
{
}
@Override
public void onDonePressed()
{
finish();
}
@Override
public void onSlideChanged()
{
}
}

View File

@@ -1,346 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits;
import android.appwidget.AppWidgetManager;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.app.ActionBar;
import android.view.Menu;
import android.view.MenuItem;
import org.isoron.uhabits.fragments.ListHabitsFragment;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.helpers.ReminderHelper;
import org.isoron.uhabits.helpers.UIHelper;
import org.isoron.uhabits.models.Checkmark;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.tasks.BaseTask;
import org.isoron.uhabits.widgets.CheckmarkWidgetProvider;
import org.isoron.uhabits.widgets.FrequencyWidgetProvider;
import org.isoron.uhabits.widgets.HistoryWidgetProvider;
import org.isoron.uhabits.widgets.ScoreWidgetProvider;
import org.isoron.uhabits.widgets.StreakWidgetProvider;
import java.io.IOException;
public class MainActivity extends BaseActivity
implements ListHabitsFragment.OnHabitClickListener
{
private ListHabitsFragment listHabitsFragment;
private SharedPreferences prefs;
private BroadcastReceiver receiver;
private LocalBroadcastManager localBroadcastManager;
public static final String ACTION_REFRESH = "org.isoron.uhabits.ACTION_REFRESH";
public static final int RESULT_IMPORT_DATA = 1;
public static final int RESULT_EXPORT_CSV = 2;
public static final int RESULT_EXPORT_DB = 3;
public static final int RESULT_BUG_REPORT = 4;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.list_habits_activity);
setupSupportActionBar(false);
prefs = PreferenceManager.getDefaultSharedPreferences(this);
listHabitsFragment =
(ListHabitsFragment) getSupportFragmentManager().findFragmentById(R.id.fragment1);
receiver = new Receiver();
localBroadcastManager = LocalBroadcastManager.getInstance(this);
localBroadcastManager.registerReceiver(receiver, new IntentFilter(ACTION_REFRESH));
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
onPreLollipopStartup();
onStartup();
}
private void onPreLollipopStartup()
{
ActionBar actionBar = getSupportActionBar();
if(actionBar == null) return;
if(UIHelper.isNightMode()) return;
int color = getResources().getColor(R.color.grey_900);
actionBar.setBackgroundDrawable(new ColorDrawable(color));
}
private void onStartup()
{
PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
UIHelper.incrementLaunchCount(this);
UIHelper.updateLastAppVersion(this);
showTutorial();
new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... params)
{
ReminderHelper.createReminderAlarms(MainActivity.this);
updateWidgets(MainActivity.this);
return null;
}
}.execute();
}
private void showTutorial()
{
Boolean firstRun = prefs.getBoolean("pref_first_run", true);
if (firstRun)
{
SharedPreferences.Editor editor = prefs.edit();
editor.putBoolean("pref_first_run", false);
editor.putLong("last_hint_timestamp", DateHelper.getStartOfToday()).apply();
editor.apply();
Intent intent = new Intent(this, IntroActivity.class);
this.startActivity(intent);
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu)
{
menu.clear();
getMenuInflater().inflate(R.menu.list_habits_menu, menu);
MenuItem nightModeItem = menu.findItem(R.id.action_night_mode);
nightModeItem.setChecked(UIHelper.isNightMode());
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
switch (item.getItemId())
{
case R.id.action_night_mode:
{
if(UIHelper.isNightMode())
UIHelper.setCurrentTheme(UIHelper.THEME_LIGHT);
else
UIHelper.setCurrentTheme(UIHelper.THEME_DARK);
refreshTheme();
return true;
}
case R.id.action_settings:
{
Intent intent = new Intent(this, SettingsActivity.class);
startActivityForResult(intent, 0);
return true;
}
case R.id.action_about:
{
Intent intent = new Intent(this, AboutActivity.class);
startActivity(intent);
return true;
}
case R.id.action_faq:
{
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse(getString(R.string.helpURL)));
startActivity(intent);
return true;
}
default:
return super.onOptionsItemSelected(item);
}
}
private void refreshTheme()
{
new Handler().postDelayed(new Runnable()
{
@Override
public void run()
{
Intent intent = new Intent(MainActivity.this, MainActivity.class);
MainActivity.this.finish();
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
startActivity(intent);
}
}, 500); // Let the menu disappear first
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
switch (resultCode)
{
case RESULT_IMPORT_DATA:
listHabitsFragment.showImportDialog();
break;
case RESULT_EXPORT_CSV:
listHabitsFragment.exportAllHabits();
break;
case RESULT_EXPORT_DB:
listHabitsFragment.exportDB();
break;
case RESULT_BUG_REPORT:
generateBugReport();
break;
}
}
private void generateBugReport()
{
try
{
HabitsApplication.dumpBugReportToFile();
}
catch (IOException e)
{
// ignored
}
try
{
String log = "---------- BUG REPORT BEGINS ----------\n";
log += HabitsApplication.generateBugReport();
log += "---------- BUG REPORT ENDS ------------\n";
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.setType("message/rfc822");
intent.putExtra(Intent.EXTRA_EMAIL, new String[] { "dev@loophabits.org" });
intent.putExtra(Intent.EXTRA_SUBJECT, "Bug Report - Loop Habit Tracker");
intent.putExtra(Intent.EXTRA_TEXT, log);
startActivity(intent);
}
catch (IOException e)
{
e.printStackTrace();
showToast(R.string.bug_report_failed);
}
}
@Override
public void onHabitClicked(Habit habit)
{
Intent intent = new Intent(this, ShowHabitActivity.class);
intent.setData(Uri.parse("content://org.isoron.uhabits/habit/" + habit.getId()));
startActivity(intent);
}
@Override
public void onPostExecuteCommand(Long refreshKey)
{
listHabitsFragment.onPostExecuteCommand(refreshKey);
new BaseTask()
{
@Override
protected void doInBackground()
{
dismissNotifications(MainActivity.this);
updateWidgets(MainActivity.this);
}
}.execute();
}
private void dismissNotifications(Context context)
{
for(Habit h : Habit.getHabitsWithReminder())
{
if(h.checkmarks.getTodayValue() != Checkmark.UNCHECKED)
HabitBroadcastReceiver.dismissNotification(context, h);
}
}
public static void updateWidgets(Context context)
{
updateWidgets(context, CheckmarkWidgetProvider.class);
updateWidgets(context, HistoryWidgetProvider.class);
updateWidgets(context, ScoreWidgetProvider.class);
updateWidgets(context, StreakWidgetProvider.class);
updateWidgets(context, FrequencyWidgetProvider.class);
}
private static void updateWidgets(Context context, Class providerClass)
{
ComponentName provider = new ComponentName(context, providerClass);
Intent intent = new Intent(context, providerClass);
intent.setAction(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
int ids[] = AppWidgetManager.getInstance(context).getAppWidgetIds(provider);
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, ids);
context.sendBroadcast(intent);
}
@Override
protected void onDestroy()
{
localBroadcastManager.unregisterReceiver(receiver);
super.onDestroy();
}
class Receiver extends BroadcastReceiver
{
@Override
public void onReceive(Context context, Intent intent)
{
listHabitsFragment.onPostExecuteCommand(null);
}
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
@NonNull int[] grantResults)
{
if (grantResults.length <= 0) return;
if (grantResults[0] != PackageManager.PERMISSION_GRANTED) return;
listHabitsFragment.showImportDialog();
}
}

View File

@@ -1,64 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits;
import android.content.ContentUris;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.models.Habit;
public class ShowHabitActivity extends BaseActivity
{
private Habit habit;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
Uri data = getIntent().getData();
habit = Habit.get(ContentUris.parseId(data));
setContentView(R.layout.show_habit_activity);
setupSupportActionBar(true);
setupHabitActionBar();
}
private void setupHabitActionBar()
{
if(habit == null) return;
ActionBar actionBar = getSupportActionBar();
if(actionBar == null) return;
actionBar.setTitle(habit.name);
setupActionBarColor(ColorHelper.getColor(this, habit.color));
}
public Habit getHabit()
{
return habit;
}
}

View File

@@ -1,58 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.commands;
import org.isoron.uhabits.R;
import org.isoron.uhabits.models.Habit;
import java.util.List;
public class ArchiveHabitsCommand extends Command
{
private List<Habit> habits;
public ArchiveHabitsCommand(List<Habit> habits)
{
this.habits = habits;
}
@Override
public void execute()
{
Habit.archive(habits);
}
@Override
public void undo()
{
Habit.unarchive(habits);
}
public Integer getExecuteStringId()
{
return R.string.toast_habit_archived;
}
public Integer getUndoStringId()
{
return R.string.toast_habit_unarchived;
}
}

View File

@@ -1,80 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.commands;
import com.activeandroid.ActiveAndroid;
import org.isoron.uhabits.R;
import org.isoron.uhabits.helpers.DatabaseHelper;
import org.isoron.uhabits.models.Habit;
import java.util.ArrayList;
import java.util.List;
public class ChangeHabitColorCommand extends Command
{
List<Habit> habits;
List<Integer> originalColors;
Integer newColor;
public ChangeHabitColorCommand(List<Habit> habits, Integer newColor)
{
this.habits = habits;
this.newColor = newColor;
this.originalColors = new ArrayList<>(habits.size());
for(Habit h : habits)
originalColors.add(h.color);
}
@Override
public void execute()
{
Habit.setColor(habits, newColor);
}
@Override
public void undo()
{
DatabaseHelper.executeAsTransaction(new DatabaseHelper.Command()
{
@Override
public void execute()
{
int k = 0;
for(Habit h : habits)
{
h.color = originalColors.get(k++);
h.save();
}
}
});
}
public Integer getExecuteStringId()
{
return R.string.toast_habit_changed;
}
public Integer getUndoStringId()
{
return R.string.toast_habit_changed;
}
}

View File

@@ -1,71 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.commands;
import org.isoron.uhabits.R;
import org.isoron.uhabits.models.Habit;
public class CreateHabitCommand extends Command
{
private Habit model;
private Long savedId;
public CreateHabitCommand(Habit model)
{
this.model = model;
}
@Override
public void execute()
{
Habit savedHabit = new Habit(model);
if (savedId == null)
{
savedHabit.save();
savedId = savedHabit.getId();
}
else
{
savedHabit.save(savedId);
}
}
@Override
public void undo()
{
Habit habit = Habit.get(savedId);
if(habit == null) throw new RuntimeException("Habit not found");
habit.cascadeDelete();
}
@Override
public Integer getExecuteStringId()
{
return R.string.toast_habit_created;
}
@Override
public Integer getUndoStringId()
{
return R.string.toast_habit_deleted;
}
}

View File

@@ -1,60 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.commands;
import org.isoron.uhabits.R;
import org.isoron.uhabits.models.Habit;
import java.util.List;
public class DeleteHabitsCommand extends Command
{
private List<Habit> habits;
public DeleteHabitsCommand(List<Habit> habits)
{
this.habits = habits;
}
@Override
public void execute()
{
for(Habit h : habits)
h.cascadeDelete();
Habit.rebuildOrder();
}
@Override
public void undo()
{
throw new UnsupportedOperationException();
}
public Integer getExecuteStringId()
{
return R.string.toast_habit_deleted;
}
public Integer getUndoStringId()
{
return R.string.toast_habit_restored;
}
}

View File

@@ -1,84 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.commands;
import org.isoron.uhabits.R;
import org.isoron.uhabits.models.Habit;
public class EditHabitCommand extends Command
{
private Habit original;
private Habit modified;
private long savedId;
private boolean hasIntervalChanged;
public EditHabitCommand(Habit original, Habit modified)
{
this.savedId = original.getId();
this.modified = new Habit(modified);
this.original = new Habit(original);
hasIntervalChanged = (!this.original.freqDen.equals(this.modified.freqDen) ||
!this.original.freqNum.equals(this.modified.freqNum));
}
@Override
public void execute()
{
copyAttributes(this.modified);
}
@Override
public void undo()
{
copyAttributes(this.original);
}
private void copyAttributes(Habit model)
{
Habit habit = Habit.get(savedId);
if(habit == null) throw new RuntimeException("Habit not found");
habit.copyAttributes(model);
habit.save();
invalidateIfNeeded(habit);
}
private void invalidateIfNeeded(Habit habit)
{
if (hasIntervalChanged)
{
habit.checkmarks.deleteNewerThan(0);
habit.streaks.deleteNewerThan(0);
habit.scores.invalidateNewerThan(0);
}
}
public Integer getExecuteStringId()
{
return R.string.toast_habit_changed;
}
public Integer getUndoStringId()
{
return R.string.toast_habit_changed_back;
}
}

View File

@@ -1,58 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.commands;
import org.isoron.uhabits.R;
import org.isoron.uhabits.models.Habit;
import java.util.List;
public class UnarchiveHabitsCommand extends Command
{
private List<Habit> habits;
public UnarchiveHabitsCommand(List<Habit> habits)
{
this.habits = habits;
}
@Override
public void execute()
{
Habit.unarchive(habits);
}
@Override
public void undo()
{
Habit.archive(habits);
}
public Integer getExecuteStringId()
{
return R.string.toast_habit_unarchived;
}
public Integer getUndoStringId()
{
return R.string.toast_habit_archived;
}
}

View File

@@ -1,457 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.dialogs;
import android.annotation.SuppressLint;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v7.app.AppCompatDialogFragment;
import android.text.format.DateFormat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.Spinner;
import android.widget.TextView;
import com.android.colorpicker.ColorPickerDialog;
import com.android.colorpicker.ColorPickerSwatch;
import com.android.datetimepicker.time.RadialPickerLayout;
import com.android.datetimepicker.time.TimePickerDialog;
import org.isoron.uhabits.R;
import org.isoron.uhabits.commands.Command;
import org.isoron.uhabits.commands.CreateHabitCommand;
import org.isoron.uhabits.commands.EditHabitCommand;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.helpers.UIHelper.OnSavedListener;
import org.isoron.uhabits.models.Habit;
import java.util.Arrays;
public class EditHabitDialogFragment extends AppCompatDialogFragment
implements OnClickListener, WeekdayPickerDialog.OnWeekdaysPickedListener,
TimePickerDialog.OnTimeSetListener, Spinner.OnItemSelectedListener
{
private Integer mode;
static final int EDIT_MODE = 0;
static final int CREATE_MODE = 1;
private OnSavedListener onSavedListener;
private Habit originalHabit;
private Habit modifiedHabit;
private TextView tvName;
private TextView tvDescription;
private TextView tvFreqNum;
private TextView tvFreqDen;
private TextView tvReminderTime;
private TextView tvReminderDays;
private Spinner sFrequency;
private ViewGroup llCustomFrequency;
private ViewGroup llReminderDays;
private SharedPreferences prefs;
private boolean is24HourMode;
public static EditHabitDialogFragment editSingleHabitFragment(long id)
{
EditHabitDialogFragment frag = new EditHabitDialogFragment();
Bundle args = new Bundle();
args.putLong("habitId", id);
args.putInt("editMode", EDIT_MODE);
frag.setArguments(args);
return frag;
}
public static EditHabitDialogFragment createHabitFragment()
{
EditHabitDialogFragment frag = new EditHabitDialogFragment();
Bundle args = new Bundle();
args.putInt("editMode", CREATE_MODE);
frag.setArguments(args);
return frag;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState)
{
View view = inflater.inflate(R.layout.edit_habit, container, false);
tvName = (TextView) view.findViewById(R.id.input_name);
tvDescription = (TextView) view.findViewById(R.id.input_description);
tvFreqNum = (TextView) view.findViewById(R.id.input_freq_num);
tvFreqDen = (TextView) view.findViewById(R.id.input_freq_den);
tvReminderTime = (TextView) view.findViewById(R.id.inputReminderTime);
tvReminderDays = (TextView) view.findViewById(R.id.inputReminderDays);
sFrequency = (Spinner) view.findViewById(R.id.sFrequency);
llCustomFrequency = (ViewGroup) view.findViewById(R.id.llCustomFrequency);
llReminderDays = (ViewGroup) view.findViewById(R.id.llReminderDays);
Button buttonSave = (Button) view.findViewById(R.id.buttonSave);
Button buttonDiscard = (Button) view.findViewById(R.id.buttonDiscard);
ImageButton buttonPickColor = (ImageButton) view.findViewById(R.id.buttonPickColor);
buttonSave.setOnClickListener(this);
buttonDiscard.setOnClickListener(this);
tvReminderTime.setOnClickListener(this);
tvReminderDays.setOnClickListener(this);
buttonPickColor.setOnClickListener(this);
sFrequency.setOnItemSelectedListener(this);
prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
Bundle args = getArguments();
mode = (Integer) args.get("editMode");
is24HourMode = DateFormat.is24HourFormat(getActivity());
if (mode == CREATE_MODE)
{
getDialog().setTitle(R.string.create_habit);
modifiedHabit = new Habit();
modifiedHabit.freqNum = 1;
modifiedHabit.freqDen = 1;
modifiedHabit.color = prefs.getInt("pref_default_habit_palette_color", modifiedHabit.color);
}
else if (mode == EDIT_MODE)
{
Long habitId = (Long) args.get("habitId");
if(habitId == null) throw new IllegalArgumentException("habitId must be specified");
originalHabit = Habit.get(habitId);
modifiedHabit = new Habit(originalHabit);
getDialog().setTitle(R.string.edit_habit);
tvName.append(modifiedHabit.name);
tvDescription.append(modifiedHabit.description);
}
if(savedInstanceState != null)
{
modifiedHabit.color = savedInstanceState.getInt("color", modifiedHabit.color);
modifiedHabit.reminderMin = savedInstanceState.getInt("reminderMin", -1);
modifiedHabit.reminderHour = savedInstanceState.getInt("reminderHour", -1);
modifiedHabit.reminderDays = savedInstanceState.getInt("reminderDays", -1);
if(modifiedHabit.reminderMin < 0)
modifiedHabit.clearReminder();
}
tvFreqNum.append(modifiedHabit.freqNum.toString());
tvFreqDen.append(modifiedHabit.freqDen.toString());
changeColor(modifiedHabit.color);
updateFrequency();
updateReminder();
return view;
}
private void changeColor(int paletteColor)
{
modifiedHabit.color = paletteColor;
tvName.setTextColor(ColorHelper.getColor(getActivity(), paletteColor));
SharedPreferences.Editor editor = prefs.edit();
editor.putInt("pref_default_habit_palette_color", paletteColor);
editor.apply();
}
@SuppressWarnings("ConstantConditions")
private void updateReminder()
{
if (modifiedHabit.hasReminder())
{
tvReminderTime.setText(DateHelper.formatTime(getActivity(), modifiedHabit.reminderHour,
modifiedHabit.reminderMin));
llReminderDays.setVisibility(View.VISIBLE);
boolean weekdays[] = DateHelper.unpackWeekdayList(modifiedHabit.reminderDays);
tvReminderDays.setText(DateHelper.formatWeekdayList(getActivity(), weekdays));
}
else
{
tvReminderTime.setText(R.string.reminder_off);
llReminderDays.setVisibility(View.GONE);
}
}
public void setOnSavedListener(OnSavedListener onSavedListener)
{
this.onSavedListener = onSavedListener;
}
@Override
public void onClick(View v)
{
switch(v.getId())
{
case R.id.inputReminderTime:
onDateSpinnerClick();
break;
case R.id.inputReminderDays:
onWeekdayClick();
break;
case R.id.buttonSave:
onSaveButtonClick();
break;
case R.id.buttonDiscard:
dismiss();
break;
case R.id.buttonPickColor:
onColorButtonClick();
break;
}
}
private void onColorButtonClick()
{
int originalAndroidColor = ColorHelper.getColor(getActivity(), modifiedHabit.color);
ColorPickerDialog picker = ColorPickerDialog.newInstance(
R.string.color_picker_default_title, ColorHelper.getPalette(getActivity()),
originalAndroidColor, 4, ColorPickerDialog.SIZE_SMALL);
picker.setOnColorSelectedListener(new ColorPickerSwatch.OnColorSelectedListener()
{
public void onColorSelected(int androidColor)
{
int paletteColor = ColorHelper.colorToPaletteIndex(getActivity(), androidColor);
changeColor(paletteColor);
}
});
picker.show(getFragmentManager(), "picker");
}
private void onSaveButtonClick()
{
modifiedHabit.name = tvName.getText().toString().trim();
modifiedHabit.description = tvDescription.getText().toString().trim();
String freqNum = tvFreqNum.getText().toString();
String freqDen = tvFreqDen.getText().toString();
if(!freqNum.isEmpty()) modifiedHabit.freqNum = Integer.parseInt(freqNum);
if(!freqDen.isEmpty()) modifiedHabit.freqDen = Integer.parseInt(freqDen);
if (!validate()) return;
Command command = null;
Habit savedHabit = null;
if (mode == EDIT_MODE)
{
command = new EditHabitCommand(originalHabit, modifiedHabit);
savedHabit = originalHabit;
}
else if (mode == CREATE_MODE)
{
command = new CreateHabitCommand(modifiedHabit);
}
if (onSavedListener != null) onSavedListener.onSaved(command, savedHabit);
dismiss();
}
private boolean validate()
{
Boolean valid = true;
if (modifiedHabit.name.length() == 0)
{
tvName.setError(getString(R.string.validation_name_should_not_be_blank));
valid = false;
}
if (modifiedHabit.freqNum <= 0)
{
tvFreqNum.setError(getString(R.string.validation_number_should_be_positive));
valid = false;
}
if (modifiedHabit.freqNum > modifiedHabit.freqDen)
{
tvFreqNum.setError(getString(R.string.validation_at_most_one_rep_per_day));
valid = false;
}
return valid;
}
@SuppressWarnings("ConstantConditions")
private void onDateSpinnerClick()
{
int defaultHour = 8;
int defaultMin = 0;
if (modifiedHabit.hasReminder())
{
defaultHour = modifiedHabit.reminderHour;
defaultMin = modifiedHabit.reminderMin;
}
TimePickerDialog timePicker =
TimePickerDialog.newInstance(this, defaultHour, defaultMin, is24HourMode);
timePicker.show(getFragmentManager(), "timePicker");
}
@SuppressWarnings("ConstantConditions")
private void onWeekdayClick()
{
if(!modifiedHabit.hasReminder()) return;
WeekdayPickerDialog dialog = new WeekdayPickerDialog();
dialog.setListener(this);
dialog.setSelectedDays(DateHelper.unpackWeekdayList(modifiedHabit.reminderDays));
dialog.show(getFragmentManager(), "weekdayPicker");
}
@Override
public void onTimeSet(RadialPickerLayout view, int hour, int minute)
{
modifiedHabit.reminderHour = hour;
modifiedHabit.reminderMin = minute;
modifiedHabit.reminderDays = DateHelper.ALL_WEEK_DAYS;
updateReminder();
}
@Override
public void onTimeCleared(RadialPickerLayout view)
{
modifiedHabit.clearReminder();
updateReminder();
}
@Override
public void onWeekdaysPicked(boolean[] selectedDays)
{
int count = 0;
for(int i = 0; i < 7; i++)
if(selectedDays[i]) count++;
if(count == 0) Arrays.fill(selectedDays, true);
modifiedHabit.reminderDays = DateHelper.packWeekdayList(selectedDays);
updateReminder();
}
@Override
@SuppressWarnings("ConstantConditions")
public void onSaveInstanceState(Bundle outState)
{
super.onSaveInstanceState(outState);
outState.putInt("color", modifiedHabit.color);
if(modifiedHabit.hasReminder())
{
outState.putInt("reminderMin", modifiedHabit.reminderMin);
outState.putInt("reminderHour", modifiedHabit.reminderHour);
outState.putInt("reminderDays", modifiedHabit.reminderDays);
}
}
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id)
{
if(parent.getId() == R.id.sFrequency)
{
switch (position)
{
case 0:
modifiedHabit.freqNum = 1;
modifiedHabit.freqDen = 1;
break;
case 1:
modifiedHabit.freqNum = 1;
modifiedHabit.freqDen = 7;
break;
case 2:
modifiedHabit.freqNum = 2;
modifiedHabit.freqDen = 7;
break;
case 3:
modifiedHabit.freqNum = 5;
modifiedHabit.freqDen = 7;
break;
case 4:
modifiedHabit.freqNum = 3;
modifiedHabit.freqDen = 7;
break;
}
}
updateFrequency();
}
@SuppressLint("SetTextI18n")
private void updateFrequency()
{
int quickSelectPosition = -1;
if(modifiedHabit.freqNum.equals(modifiedHabit.freqDen))
quickSelectPosition = 0;
else if(modifiedHabit.freqNum == 1 && modifiedHabit.freqDen == 7)
quickSelectPosition = 1;
else if(modifiedHabit.freqNum == 2 && modifiedHabit.freqDen == 7)
quickSelectPosition = 2;
else if(modifiedHabit.freqNum == 5 && modifiedHabit.freqDen == 7)
quickSelectPosition = 3;
if(quickSelectPosition >= 0)
{
sFrequency.setVisibility(View.VISIBLE);
sFrequency.setSelection(quickSelectPosition);
llCustomFrequency.setVisibility(View.GONE);
tvFreqNum.setText(modifiedHabit.freqNum.toString());
tvFreqDen.setText(modifiedHabit.freqDen.toString());
}
else
{
sFrequency.setVisibility(View.GONE);
llCustomFrequency.setVisibility(View.VISIBLE);
}
}
@Override
public void onNothingSelected(AdapterView<?> parent)
{
}
}

View File

@@ -1,175 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.dialogs;
import android.app.Activity;
import android.app.Dialog;
import android.support.annotation.NonNull;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager.LayoutParams;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import java.io.File;
import java.io.FileFilter;
import java.util.Arrays;
public class FilePickerDialog implements AdapterView.OnItemClickListener
{
private static final String PARENT_DIR = "..";
private final Activity activity;
private ListView list;
private Dialog dialog;
private File currentPath;
public interface OnFileSelectedListener
{
void onFileSelected(File file);
}
private OnFileSelectedListener listener;
public FilePickerDialog(Activity activity, File initialDirectory)
{
this.activity = activity;
list = new ListView(activity);
list.setOnItemClickListener(this);
dialog = new Dialog(activity);
dialog.setContentView(list);
dialog.getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
navigateTo(initialDirectory);
}
@Override
public void onItemClick(AdapterView<?> parent, View view, int which, long id)
{
String filename = (String) list.getItemAtPosition(which);
File file;
if (filename.equals(PARENT_DIR))
file = currentPath.getParentFile();
else
file = new File(currentPath, filename);
if (file.isDirectory())
{
navigateTo(file);
}
else
{
if (listener != null) listener.onFileSelected(file);
dialog.dismiss();
}
}
public void show()
{
dialog.show();
}
public void setListener(OnFileSelectedListener listener)
{
this.listener = listener;
}
private void navigateTo(File path)
{
if (!path.exists()) return;
File[] dirs = path.listFiles(new ReadableDirFilter());
File[] files = path.listFiles(new RegularReadableFileFilter());
if(dirs == null || files == null) return;
this.currentPath = path;
dialog.setTitle(currentPath.getPath());
list.setAdapter(new FilePickerAdapter(getFileList(path, dirs, files)));
}
@NonNull
private String[] getFileList(File path, File[] dirs, File[] files)
{
int count = 0;
int length = dirs.length + files.length;
String[] fileList;
if (path.getParentFile() == null || !path.getParentFile().canRead())
{
fileList = new String[length];
}
else
{
fileList = new String[length + 1];
fileList[count++] = PARENT_DIR;
}
Arrays.sort(dirs);
Arrays.sort(files);
for (File dir : dirs)
fileList[count++] = dir.getName();
for (File file : files)
fileList[count++] = file.getName();
return fileList;
}
private class FilePickerAdapter extends ArrayAdapter<String>
{
public FilePickerAdapter(@NonNull String[] fileList)
{
super(FilePickerDialog.this.activity, android.R.layout.simple_list_item_1, fileList);
}
@Override
public View getView(int pos, View view, ViewGroup parent)
{
view = super.getView(pos, view, parent);
TextView tv = (TextView) view;
tv.setSingleLine(true);
return view;
}
}
private static class ReadableDirFilter implements FileFilter
{
@Override
public boolean accept(File file)
{
return (file.isDirectory() && file.canRead());
}
}
private class RegularReadableFileFilter implements FileFilter
{
@Override
public boolean accept(File file)
{
return !file.isDirectory() && file.canRead();
}
}
}

View File

@@ -1,127 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.dialogs;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatDialogFragment;
import android.util.DisplayMetrics;
import org.isoron.uhabits.R;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.tasks.BaseTask;
import org.isoron.uhabits.views.HabitHistoryView;
public class HistoryEditorDialog extends AppCompatDialogFragment
implements DialogInterface.OnClickListener
{
private Habit habit;
private Listener listener;
HabitHistoryView historyView;
@Override
public Dialog onCreateDialog(Bundle savedInstanceState)
{
Context context = getActivity();
historyView = new HabitHistoryView(context, null);
if(savedInstanceState != null)
{
long id = savedInstanceState.getLong("habit", -1);
if(id > 0) this.habit = Habit.get(id);
}
int padding = (int) getResources().getDimension(R.dimen.history_editor_padding);
historyView.setPadding(padding, 0, padding, 0);
historyView.setHabit(habit);
historyView.setIsEditable(true);
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle(R.string.history)
.setView(historyView)
.setPositiveButton(android.R.string.ok, this);
refreshData();
return builder.create();
}
private void refreshData()
{
new BaseTask()
{
@Override
protected void doInBackground()
{
historyView.refreshData();
}
}.execute();
}
@Override
public void onResume()
{
super.onResume();
DisplayMetrics metrics = getResources().getDisplayMetrics();
int maxHeight = getResources().getDimensionPixelSize(R.dimen.history_editor_max_height);
int width = metrics.widthPixels;
int height = Math.min(metrics.heightPixels, maxHeight);
getDialog().getWindow().setLayout(width, height);
}
@Override
public void onClick(DialogInterface dialog, int which)
{
dismiss();
}
public void setHabit(Habit habit)
{
this.habit = habit;
if(historyView != null) historyView.setHabit(habit);
}
@Override
public void onPause()
{
super.onPause();
if(listener != null) listener.onHistoryEditorClosed();
}
@Override
public void onSaveInstanceState(Bundle outState)
{
outState.putLong("habit", habit.getId());
}
public void setListener(Listener listener)
{
this.listener = listener;
}
public interface Listener {
void onHistoryEditorClosed();
}
}

View File

@@ -1,83 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.dialogs;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatDialogFragment;
import org.isoron.uhabits.R;
import org.isoron.uhabits.helpers.DateHelper;
public class WeekdayPickerDialog extends AppCompatDialogFragment
implements DialogInterface.OnMultiChoiceClickListener, DialogInterface.OnClickListener
{
public interface OnWeekdaysPickedListener
{
void onWeekdaysPicked(boolean[] selectedDays);
}
private boolean[] selectedDays;
private OnWeekdaysPickedListener listener;
public void setListener(OnWeekdaysPickedListener listener)
{
this.listener = listener;
}
public void setSelectedDays(boolean[] selectedDays)
{
this.selectedDays = selectedDays;
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState)
{
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setTitle(R.string.select_weekdays)
.setMultiChoiceItems(DateHelper.getLongDayNames(), selectedDays, this)
.setPositiveButton(android.R.string.yes, this)
.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener()
{
@Override
public void onClick(DialogInterface dialog, int which)
{
dismiss();
}
});
return builder.create();
}
@Override
public void onClick(DialogInterface dialog, int which, boolean isChecked)
{
selectedDays[which] = isChecked;
}
@Override
public void onClick(DialogInterface dialog, int which)
{
if(listener != null) listener.onWeekdaysPicked(selectedDays);
}
}

View File

@@ -1,101 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.fragments;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import org.isoron.uhabits.R;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.helpers.ListHabitsHelper;
import org.isoron.uhabits.loaders.HabitListLoader;
import org.isoron.uhabits.models.Habit;
import java.util.List;
class HabitListAdapter extends BaseAdapter
{
private LayoutInflater inflater;
private HabitListLoader loader;
private ListHabitsHelper helper;
private List selectedPositions;
private View.OnLongClickListener onCheckmarkLongClickListener;
private View.OnClickListener onCheckmarkClickListener;
public HabitListAdapter(Context context, HabitListLoader loader)
{
this.loader = loader;
inflater = LayoutInflater.from(context);
helper = new ListHabitsHelper(context, loader);
}
@Override
public int getCount()
{
return loader.habits.size();
}
@Override
public Habit getItem(int position)
{
return loader.habitsList.get(position);
}
@Override
public long getItemId(int position)
{
return (getItem(position)).getId();
}
@Override
public View getView(int position, View view, ViewGroup parent)
{
final Habit habit = loader.habitsList.get(position);
boolean selected = selectedPositions.contains(position);
if (view == null || (Long) view.getTag(R.id.timestamp_key) != DateHelper.getStartOfToday())
{
view = helper.inflateHabitCard(inflater, onCheckmarkLongClickListener,
onCheckmarkClickListener);
}
helper.updateHabitCard(view, habit, selected);
return view;
}
public void setSelectedPositions(List selectedPositions)
{
this.selectedPositions = selectedPositions;
}
public void setOnCheckmarkLongClickListener(View.OnLongClickListener listener)
{
this.onCheckmarkLongClickListener = listener;
}
public void setOnCheckmarkClickListener(View.OnClickListener listener)
{
this.onCheckmarkClickListener = listener;
}
}

View File

@@ -1,218 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.fragments;
import android.content.DialogInterface;
import android.support.v7.app.AlertDialog;
import android.support.v7.view.ActionMode;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ProgressBar;
import com.android.colorpicker.ColorPickerDialog;
import com.android.colorpicker.ColorPickerSwatch;
import org.isoron.uhabits.BaseActivity;
import org.isoron.uhabits.R;
import org.isoron.uhabits.commands.ArchiveHabitsCommand;
import org.isoron.uhabits.commands.ChangeHabitColorCommand;
import org.isoron.uhabits.commands.DeleteHabitsCommand;
import org.isoron.uhabits.commands.UnarchiveHabitsCommand;
import org.isoron.uhabits.dialogs.EditHabitDialogFragment;
import org.isoron.uhabits.helpers.ColorHelper;
import org.isoron.uhabits.helpers.UIHelper;
import org.isoron.uhabits.loaders.HabitListLoader;
import org.isoron.uhabits.models.Habit;
import java.util.LinkedList;
import java.util.List;
public class HabitSelectionCallback implements ActionMode.Callback
{
private HabitListLoader loader;
private List<Integer> selectedPositions;
private BaseActivity activity;
private Listener listener;
private UIHelper.OnSavedListener onSavedListener;
private ProgressBar progressBar;
public interface Listener
{
void onActionModeDestroyed(ActionMode mode);
}
public HabitSelectionCallback(BaseActivity activity, HabitListLoader loader)
{
this.activity = activity;
this.loader = loader;
selectedPositions = new LinkedList<>();
}
public void setListener(Listener listener)
{
this.listener = listener;
}
public void setProgressBar(ProgressBar progressBar)
{
this.progressBar = progressBar;
}
public void setOnSavedListener(UIHelper.OnSavedListener onSavedListener)
{
this.onSavedListener = onSavedListener;
}
public void setSelectedPositions(List<Integer> selectedPositions)
{
this.selectedPositions = selectedPositions;
}
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu)
{
activity.getMenuInflater().inflate(R.menu.list_habits_context, menu);
updateTitle(mode);
updateActions(menu);
return true;
}
@Override
public boolean onPrepareActionMode(ActionMode mode, Menu menu)
{
updateTitle(mode);
updateActions(menu);
return true;
}
private void updateActions(Menu menu)
{
boolean showEdit = (selectedPositions.size() == 1);
boolean showArchive = true;
boolean showUnarchive = true;
for (int i : selectedPositions)
{
Habit h = loader.habitsList.get(i);
if (h.isArchived())
{
showArchive = false;
}
else showUnarchive = false;
}
MenuItem itemEdit = menu.findItem(R.id.action_edit_habit);
MenuItem itemColor = menu.findItem(R.id.action_color);
MenuItem itemArchive = menu.findItem(R.id.action_archive_habit);
MenuItem itemUnarchive = menu.findItem(R.id.action_unarchive_habit);
itemColor.setVisible(true);
itemEdit.setVisible(showEdit);
itemArchive.setVisible(showArchive);
itemUnarchive.setVisible(showUnarchive);
}
private void updateTitle(ActionMode mode)
{
mode.setTitle("" + selectedPositions.size());
}
@Override
public boolean onActionItemClicked(final ActionMode mode, MenuItem item)
{
final LinkedList<Habit> selectedHabits = new LinkedList<>();
for (int i : selectedPositions)
selectedHabits.add(loader.habitsList.get(i));
Habit firstHabit = selectedHabits.getFirst();
switch (item.getItemId())
{
case R.id.action_archive_habit:
activity.executeCommand(new ArchiveHabitsCommand(selectedHabits), null);
mode.finish();
return true;
case R.id.action_unarchive_habit:
activity.executeCommand(new UnarchiveHabitsCommand(selectedHabits), null);
mode.finish();
return true;
case R.id.action_edit_habit:
{
EditHabitDialogFragment
frag = EditHabitDialogFragment.editSingleHabitFragment(firstHabit.getId());
frag.setOnSavedListener(onSavedListener);
frag.show(activity.getSupportFragmentManager(), "editHabit");
return true;
}
case R.id.action_color:
{
int originalAndroidColor = ColorHelper.getColor(activity, firstHabit.color);
ColorPickerDialog picker = ColorPickerDialog.newInstance(
R.string.color_picker_default_title, ColorHelper.getPalette(activity),
originalAndroidColor, 4, ColorPickerDialog.SIZE_SMALL);
picker.setOnColorSelectedListener(new ColorPickerSwatch.OnColorSelectedListener()
{
public void onColorSelected(int androidColor)
{
int paletteColor = ColorHelper.colorToPaletteIndex(activity,
androidColor);
activity.executeCommand(new ChangeHabitColorCommand(selectedHabits,
paletteColor), null);
mode.finish();
}
});
picker.show(activity.getSupportFragmentManager(), "picker");
return true;
}
case R.id.action_delete:
{
new AlertDialog.Builder(activity).setTitle(R.string.delete_habits)
.setMessage(R.string.delete_habits_message)
.setPositiveButton(android.R.string.yes,
new DialogInterface.OnClickListener()
{
@Override
public void onClick(DialogInterface dialog, int which)
{
activity.executeCommand(
new DeleteHabitsCommand(selectedHabits), null);
mode.finish();
}
}).setNegativeButton(android.R.string.no, null)
.show();
return true;
}
}
return false;
}
@Override
public void onDestroyActionMode(ActionMode mode)
{
if(listener != null) listener.onActionModeDestroyed(mode);
}
}

View File

@@ -1,525 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.fragments;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.view.ActionMode;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.HapticFeedbackConstants;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnLongClickListener;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.mobeta.android.dslv.DragSortController;
import com.mobeta.android.dslv.DragSortListView;
import com.mobeta.android.dslv.DragSortListView.DropListener;
import org.isoron.uhabits.BaseActivity;
import org.isoron.uhabits.R;
import org.isoron.uhabits.commands.Command;
import org.isoron.uhabits.commands.ToggleRepetitionCommand;
import org.isoron.uhabits.dialogs.EditHabitDialogFragment;
import org.isoron.uhabits.dialogs.FilePickerDialog;
import org.isoron.uhabits.helpers.DatabaseHelper;
import org.isoron.uhabits.helpers.DateHelper;
import org.isoron.uhabits.helpers.HintManager;
import org.isoron.uhabits.helpers.ListHabitsHelper;
import org.isoron.uhabits.helpers.ReminderHelper;
import org.isoron.uhabits.helpers.UIHelper;
import org.isoron.uhabits.helpers.UIHelper.OnSavedListener;
import org.isoron.uhabits.loaders.HabitListLoader;
import org.isoron.uhabits.models.Habit;
import org.isoron.uhabits.tasks.ExportCSVTask;
import org.isoron.uhabits.tasks.ExportDBTask;
import org.isoron.uhabits.tasks.ImportDataTask;
import java.io.File;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
public class ListHabitsFragment extends Fragment
implements OnSavedListener, OnItemClickListener, OnLongClickListener, DropListener,
OnClickListener, HabitListLoader.Listener, AdapterView.OnItemLongClickListener,
HabitSelectionCallback.Listener, ImportDataTask.Listener, ExportCSVTask.Listener,
ExportDBTask.Listener
{
long lastLongClick = 0;
private boolean isShortToggleEnabled;
private boolean showArchived;
private ActionMode actionMode;
private HabitListAdapter adapter;
private HabitListLoader loader;
private HintManager hintManager;
private ListHabitsHelper helper;
private List<Integer> selectedPositions;
private OnHabitClickListener habitClickListener;
private BaseActivity activity;
private SharedPreferences prefs;
private DragSortListView listView;
private LinearLayout llButtonsHeader;
private ProgressBar progressBar;
private View llEmpty;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState)
{
View view = inflater.inflate(R.layout.list_habits_fragment, container, false);
View llHint = view.findViewById(R.id.llHint);
TextView tvStarEmpty = (TextView) view.findViewById(R.id.tvStarEmpty);
listView = (DragSortListView) view.findViewById(R.id.listView);
llButtonsHeader = (LinearLayout) view.findViewById(R.id.llButtonsHeader);
llEmpty = view.findViewById(R.id.llEmpty);
progressBar = (ProgressBar) view.findViewById(R.id.progressBar);
progressBar.setVisibility(View.GONE);
selectedPositions = new LinkedList<>();
loader = new HabitListLoader();
helper = new ListHabitsHelper(activity, loader);
hintManager = new HintManager(activity, llHint);
loader.setListener(this);
loader.setCheckmarkCount(helper.getButtonCount());
llHint.setOnClickListener(this);
tvStarEmpty.setTypeface(UIHelper.getFontAwesome(activity));
adapter = new HabitListAdapter(getActivity(), loader);
adapter.setSelectedPositions(selectedPositions);
adapter.setOnCheckmarkClickListener(this);
adapter.setOnCheckmarkLongClickListener(this);
DragSortListView.DragListener dragListener = new HabitsDragListener();
DragSortController dragSortController = new HabitsDragSortController();
listView.setAdapter(adapter);
listView.setOnItemClickListener(this);
listView.setOnItemLongClickListener(this);
listView.setDropListener(this);
listView.setDragListener(dragListener);
listView.setFloatViewManager(dragSortController);
listView.setDragEnabled(true);
listView.setLongClickable(true);
if(savedInstanceState != null)
{
EditHabitDialogFragment frag = (EditHabitDialogFragment) getFragmentManager()
.findFragmentByTag("editHabit");
if(frag != null) frag.setOnSavedListener(this);
}
loader.updateAllHabits(true);
setHasOptionsMenu(true);
return view;
}
@Override
@SuppressWarnings("deprecation")
public void onAttach(Activity activity)
{
super.onAttach(activity);
this.activity = (BaseActivity) activity;
habitClickListener = (OnHabitClickListener) activity;
prefs = PreferenceManager.getDefaultSharedPreferences(activity);
}
@Override
public void onResume()
{
super.onResume();
Long timestamp = loader.getLastLoadTimestamp();
if (timestamp != null && timestamp != DateHelper.getStartOfToday())
loader.updateAllHabits(true);
helper.updateEmptyMessage(llEmpty);
helper.updateHeader(llButtonsHeader);
hintManager.showHintIfAppropriate();
adapter.notifyDataSetChanged();
isShortToggleEnabled = prefs.getBoolean("pref_short_toggle", false);
}
@Override
public void onLoadFinished()
{
adapter.notifyDataSetChanged();
helper.updateEmptyMessage(llEmpty);
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater)
{
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.list_habits_options, menu);
MenuItem showArchivedItem = menu.findItem(R.id.action_show_archived);
showArchivedItem.setChecked(showArchived);
}
@Override
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo)
{
super.onCreateContextMenu(menu, view, menuInfo);
getActivity().getMenuInflater().inflate(R.menu.list_habits_context, menu);
AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo;
final Habit habit = loader.habits.get(info.id);
if (habit.isArchived()) menu.findItem(R.id.action_archive_habit).setVisible(false);
else menu.findItem(R.id.action_unarchive_habit).setVisible(false);
}
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
switch (item.getItemId())
{
case R.id.action_add:
{
EditHabitDialogFragment frag = EditHabitDialogFragment.createHabitFragment();
frag.setOnSavedListener(this);
frag.show(getFragmentManager(), "editHabit");
return true;
}
case R.id.action_show_archived:
{
showArchived = !showArchived;
loader.setIncludeArchived(showArchived);
loader.updateAllHabits(true);
activity.invalidateOptionsMenu();
return true;
}
default:
return super.onOptionsItemSelected(item);
}
}
@Override
public void onItemClick(AdapterView parent, View view, int position, long id)
{
if (new Date().getTime() - lastLongClick < 1000) return;
if(actionMode == null)
{
Habit habit = loader.habitsList.get(position);
habitClickListener.onHabitClicked(habit);
}
else
{
int k = selectedPositions.indexOf(position);
if(k < 0)
selectedPositions.add(position);
else
selectedPositions.remove(k);
if(selectedPositions.isEmpty()) actionMode.finish();
else actionMode.invalidate();
adapter.notifyDataSetChanged();
}
}
@Override
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id)
{
selectItem(position);
return true;
}
private void selectItem(int position)
{
if(!selectedPositions.contains(position))
selectedPositions.add(position);
adapter.notifyDataSetChanged();
if(actionMode == null)
{
HabitSelectionCallback callback = new HabitSelectionCallback(activity, loader);
callback.setSelectedPositions(selectedPositions);
callback.setProgressBar(progressBar);
callback.setOnSavedListener(this);
callback.setListener(this);
actionMode = activity.startSupportActionMode(callback);
}
if(actionMode != null) actionMode.invalidate();
}
@Override
public void onSaved(Command command, Object savedObject)
{
Habit h = (Habit) savedObject;
if (h == null) activity.executeCommand(command, null);
else activity.executeCommand(command, h.getId());
adapter.notifyDataSetChanged();
ReminderHelper.createReminderAlarms(activity);
if(actionMode != null) actionMode.finish();
}
@Override
public boolean onLongClick(View v)
{
lastLongClick = new Date().getTime();
switch (v.getId())
{
case R.id.tvCheck:
onCheckmarkLongClick(v);
return true;
}
return false;
}
private void onCheckmarkLongClick(View v)
{
if (isShortToggleEnabled) return;
toggleCheck(v);
}
private void toggleCheck(View v)
{
Long id = helper.getHabitIdFromCheckmarkView(v);
Habit habit = loader.habits.get(id);
if(habit == null) return;
float x = v.getX() + v.getWidth() / 2.0f + ((View) v.getParent()).getX();
float y = v.getY() + v.getHeight() / 2.0f + ((View) v.getParent()).getY();
helper.triggerRipple((View) v.getParent().getParent(), x, y);
listView.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
helper.toggleCheckmarkView(v, habit);
long timestamp = helper.getTimestampFromCheckmarkView(v);
executeCommand(new ToggleRepetitionCommand(habit, timestamp), habit.getId());
}
private void executeCommand(Command c, Long refreshKey)
{
activity.executeCommand(c, refreshKey);
}
@Override
public void drop(int from, int to)
{
if(from == to) return;
if(actionMode != null) actionMode.finish();
loader.reorder(from, to);
adapter.notifyDataSetChanged();
loader.updateAllHabits(false);
}
@Override
public void onClick(View v)
{
switch (v.getId())
{
case R.id.tvCheck:
if (isShortToggleEnabled) toggleCheck(v);
else activity.showToast(R.string.long_press_to_toggle);
break;
case R.id.llHint:
hintManager.dismissHint();
break;
}
}
public void onPostExecuteCommand(Long refreshKey)
{
if (refreshKey == null) loader.updateAllHabits(true);
else loader.updateHabit(refreshKey);
}
@Override
public void onActionModeDestroyed(ActionMode mode)
{
actionMode = null;
selectedPositions.clear();
adapter.notifyDataSetChanged();
listView.setDragEnabled(true);
}
public interface OnHabitClickListener
{
void onHabitClicked(Habit habit);
}
private class HabitsDragSortController extends DragSortController
{
public HabitsDragSortController()
{
super(ListHabitsFragment.this.listView);
setRemoveEnabled(false);
}
@Override
public View onCreateFloatView(int position)
{
return adapter.getView(position, null, null);
}
@Override
public void onDestroyFloatView(View floatView)
{
}
}
private class HabitsDragListener implements DragSortListView.DragListener
{
@Override
public void drag(int from, int to)
{
}
@Override
public void startDrag(int position)
{
selectItem(position);
}
}
public void showImportDialog()
{
File dir = DatabaseHelper.getFilesDir(null);
if(dir == null)
{
activity.showToast(R.string.could_not_import);
return;
}
FilePickerDialog picker = new FilePickerDialog(activity, dir);
picker.setListener(new FilePickerDialog.OnFileSelectedListener()
{
@Override
public void onFileSelected(File file)
{
ImportDataTask task = new ImportDataTask(file, progressBar);
task.setListener(ListHabitsFragment.this);
task.execute();
}
});
picker.show();
}
@Override
public void onImportFinished(int result)
{
switch (result)
{
case ImportDataTask.SUCCESS:
loader.updateAllHabits(true);
activity.showToast(R.string.habits_imported);
break;
case ImportDataTask.NOT_RECOGNIZED:
activity.showToast(R.string.file_not_recognized);
break;
default:
activity.showToast(R.string.could_not_import);
break;
}
}
public void exportAllHabits()
{
ExportCSVTask task = new ExportCSVTask(Habit.getAll(true), progressBar);
task.setListener(this);
task.execute();
}
@Override
public void onExportCSVFinished(@Nullable String archiveFilename)
{
if(archiveFilename != null)
{
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.setType("application/zip");
intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File(archiveFilename)));
activity.startActivity(intent);
}
else
{
activity.showToast(R.string.could_not_export);
}
}
public void exportDB()
{
ExportDBTask task = new ExportDBTask(progressBar);
task.setListener(this);
task.execute();
}
@Override
public void onExportDBFinished(@Nullable String filename)
{
if(filename != null)
{
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.setType("application/octet-stream");
intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File(filename)));
activity.startActivity(intent);
}
else
{
activity.showToast(R.string.could_not_export);
}
}
}

Some files were not shown because too many files have changed in this diff Show More