Compare commits

...

26 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
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
477 changed files with 1086 additions and 608 deletions

View File

@@ -1,31 +0,0 @@
name: Build & Test
on:
pull_request:
paths-ignore:
- '**.md'
push:
paths-ignore:
- '**.md'
jobs:
Test:
runs-on: self-hosted
timeout-minutes: 30
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Build project
run: ./build.sh build
- name: Run Android tests
run: ./build.sh android-tests-parallel 28 29 30 32 33 34
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: build
path: |
build/*log
uhabits-android/build/outputs

View File

@@ -1,32 +1,54 @@
# Changelog
## [2.3.1] -- 2025-08-13
### Changed
- Add notes to exported CSV files (@iSoron)
### Fixed
- 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)
## [2.3.0] -- 2025-06-23
### Added
- 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)
### Changed
- Change background widget color for habits with implicit checks (@wobbba, #1915)
### Fixed
- 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)
## [2.2.0] -- 2024-01-30
### Added
- Add support for Android 14 (@iSoron, @hiqua)
- Allow user to change app language (@leondzn)
### Fixed
- Implement workaround to make notifications non-dismissible in Android 14 (@iSoron, #1872)
- Fix splash screen background color in dark mode (@SIKV, #1888)
## [2.1.3] -- 2023-08-28
### Fixed
- Use text input on Samsung devices (@iSoron, #1719)
- Prevent crash if alarm permission is revoked (@iSoron)
- Adjust widget colors (@iSoron)
@@ -34,7 +56,9 @@
- Fix skip button in locales that use comma instead of dot (@iSoron, #1721)
## [2.1.2] -- 2023-05-26
### Fixed
- 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)
@@ -42,18 +66,23 @@
- Accept comma (instead of dot) in certain locales (@iSoron)
### 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)
@@ -64,10 +93,12 @@
- 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)
@@ -76,6 +107,7 @@
- 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)
@@ -84,13 +116,16 @@
- 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)
@@ -102,9 +137,11 @@
## [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)
@@ -115,18 +152,22 @@
## [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)
@@ -135,6 +176,7 @@
- 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)
@@ -142,6 +184,7 @@
## [2.0.0-alpha] - 2020-11-29
### Added
- Track numeric habits (@iSoron, @namnl)
- Skip days without breaking streak (@KristianTashkov)
- Sort habits by status (@hiqua)
@@ -152,15 +195,18 @@
- 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
@@ -185,13 +231,15 @@
## [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.
- 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.
- 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.

View File

@@ -1,8 +1,5 @@
<h1 align="center">Loop Habit Tracker</h1>
<p align="center">
<a href="https://github.com/iSoron/uhabits/actions?query=workflow%3A%22Build+%26+Test%22">
<img alt="Build & Test" src="https://github.com/iSoron/uhabits/workflows/Build%20&%20Test/badge.svg" />
</a>
<a href="https://github.com/iSoron/uhabits/releases/latest">
<img alt="release" src="https://img.shields.io/github/v/release/iSoron/uhabits" />
</a>
@@ -87,7 +84,7 @@ contribute, even if you are not a software developer.
<img align="right" alt="GPL v3" src="https://www.gnu.org/graphics/gplv3-88x31.png">
Copyright (C) 2016-2021 Álinson Santos Xavier <isoron@gmail.com>
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

View File

@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (C) 2016-2021 Álinson Santos Xavier <isoron@gmail.com>
# Copyright (C) 2016-2025 Á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

View File

@@ -32,6 +32,7 @@ rules = "1.6.1"
shadow = "8.1.1"
sqliteJdbc = "3.45.1.0"
uiautomator = "2.3.0"
documentfile = "1.0.1"
[libraries]
annotation = { group = "androidx.annotation", name = "annotation", version.ref = "annotation" }
@@ -73,6 +74,7 @@ opencsv = { group = "com.opencsv", name = "opencsv", version.ref = "opencsv" }
rules = { group = "androidx.test", name = "rules", version.ref = "rules" }
sqlite-jdbc = { module = "org.xerial:sqlite-jdbc", version.ref = "sqliteJdbc" }
uiautomator = { group = "androidx.test.uiautomator", name = "uiautomator", version.ref = "uiautomator" }
documentfile = { group = "androidx.documentfile", name = "documentfile", version.ref = "documentfile" }
[bundles]
androidTest = [

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*
@@ -44,8 +44,8 @@ android {
compileSdk = 36
defaultConfig {
versionCode = 20300
versionName = "2.3.0"
versionCode = 20301
versionName = "2.3.1"
minSdk = 28
targetSdk = 36
applicationId = "org.isoron.uhabits"
@@ -106,6 +106,7 @@ dependencies {
implementation(libs.legacy.preference.v14)
implementation(libs.legacy.support.v4)
implementation(libs.material)
implementation(libs.documentfile)
implementation(libs.opencsv)
implementation(libs.konfetti.xml)
implementation(project(":uhabits-core"))

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*
@@ -33,6 +33,8 @@ import org.isoron.uhabits.acceptance.steps.clearDownloadFolder
import org.isoron.uhabits.acceptance.steps.copyBackupToDownloadFolder
import org.isoron.uhabits.acceptance.steps.exportFullBackup
import org.isoron.uhabits.acceptance.steps.importBackupFromDownloadFolder
import org.isoron.uhabits.acceptance.steps.selectPublicBackupFolder
import org.isoron.uhabits.acceptance.steps.verifyBackupInDownloadFolder
import org.junit.Test
@LargeTest
@@ -51,4 +53,14 @@ class BackupTest : BaseUserInterfaceTest() {
importBackupFromDownloadFolder()
verifyDisplaysText("Wake up early")
}
@Test
fun shouldExportBackupToPublicFolder() {
launchApp()
clearDownloadFolder()
clearBackupFolder()
selectPublicBackupFolder()
exportFullBackup()
verifyBackupInDownloadFolder()
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*
@@ -19,8 +19,10 @@
package org.isoron.uhabits.acceptance.steps
import android.net.Uri
import android.os.Build.VERSION.SDK_INT
import android.os.SystemClock.sleep
import androidx.preference.PreferenceManager
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.By
import androidx.test.uiautomator.UiSelector
import org.isoron.uhabits.BaseUserInterfaceTest.Companion.device
@@ -28,6 +30,8 @@ import org.isoron.uhabits.acceptance.steps.CommonSteps.clickText
import org.isoron.uhabits.acceptance.steps.CommonSteps.pressBack
import org.isoron.uhabits.acceptance.steps.ListHabitsSteps.MenuItem.SETTINGS
import org.isoron.uhabits.acceptance.steps.ListHabitsSteps.clickMenu
import org.junit.Assert.assertTrue
import java.io.File
const val BACKUP_FOLDER = "/sdcard/Android/data/org.isoron.uhabits/files/Backups/"
const val DOWNLOAD_FOLDER = "/sdcard/Download/"
@@ -41,6 +45,7 @@ fun exportFullBackup() {
fun clearDownloadFolder() {
device.executeShellCommand("rm -rf /sdcard/Download")
device.executeShellCommand("mkdir /sdcard/Download")
}
fun clearBackupFolder() {
@@ -52,6 +57,13 @@ fun copyBackupToDownloadFolder() {
device.executeShellCommand("chown root $DOWNLOAD_FOLDER")
}
fun selectPublicBackupFolder() {
val context = InstrumentationRegistry.getInstrumentation().targetContext
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
val uri = Uri.fromFile(File(DOWNLOAD_FOLDER))
prefs.edit().putString("publicBackupFolder", uri.toString()).commit()
}
fun importBackupFromDownloadFolder() {
clickMenu(SETTINGS)
clickText("Import data")
@@ -93,6 +105,11 @@ fun importBackupFromDownloadFolder() {
}
}
fun verifyBackupInDownloadFolder() {
val listing = device.executeShellCommand("ls $DOWNLOAD_FOLDER")
assertTrue(listing.contains("Loop Habits Backup"))
}
fun openLauncher() {
device.pressHome()
device.waitForIdle()

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*
@@ -25,6 +25,7 @@ import org.isoron.uhabits.R
import org.isoron.uhabits.core.utils.DateUtils.Companion.getTodayWithOffset
import org.isoron.uhabits.utils.PaletteUtils.getAndroidTestColor
import org.junit.Before
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import java.io.IOException
@@ -57,6 +58,7 @@ class CheckmarkWidgetViewTest : BaseViewTest() {
@Test
@Throws(IOException::class)
@Ignore("non-deterministic")
fun testRender_checked() {
assertRenders(view, PATH + "checked.png")
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
~ Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
~
~ This file is part of Loop Habit Tracker.
~

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*
@@ -26,6 +26,7 @@ import org.isoron.uhabits.BuildConfig
import org.isoron.uhabits.R
import org.isoron.uhabits.core.models.PaletteColor
import org.isoron.uhabits.databinding.AboutBinding
import org.isoron.uhabits.utils.applyBottomInset
import org.isoron.uhabits.utils.applyRootViewInsets
import org.isoron.uhabits.utils.currentTheme
import org.isoron.uhabits.utils.setupToolbar
@@ -55,6 +56,7 @@ class AboutView(
binding.tvTranslate.setOnClickListener { screen.showTranslationWebsite() }
binding.tvVersion.setOnClickListener { screen.onPressDeveloperCountdown() }
binding.tvVersion.text = String.format(version, BuildConfig.VERSION_NAME)
binding.outerLinearLayout.applyBottomInset()
applyRootViewInsets()
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*
@@ -23,6 +23,7 @@ import android.app.Activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.provider.Settings
import androidx.appcompat.app.AppCompatActivity
import dagger.Lazy
import nl.dionsegijn.konfetti.core.Party
@@ -226,6 +227,14 @@ class ListHabitsScreen
override fun showConfetti(color: PaletteColor, x: Float, y: Float) {
if (x == 0f && y == 0f) return
if (preferences.isConfettiAnimationDisabled) return
if (Settings.Global.getFloat(
activity.contentResolver,
Settings.Global.ANIMATOR_DURATION_SCALE,
1f
) == 0f
) {
return
}
val baseColor = themeSwitcher.currentTheme!!.color(color).toInt()
rootView.get().konfettiView.start(
Party(
@@ -299,30 +308,36 @@ class ListHabitsScreen
command.selected.size
)
}
is ChangeHabitColorCommand -> {
return activity.resources.getQuantityString(
R.plurals.toast_habits_changed,
command.selected.size
)
}
is CreateHabitCommand -> {
return activity.resources.getString(R.string.toast_habit_created)
}
is DeleteHabitsCommand -> {
return activity.resources.getQuantityString(
R.plurals.toast_habits_deleted,
command.selected.size
)
}
is EditHabitCommand -> {
return activity.resources.getQuantityString(R.plurals.toast_habits_changed, 1)
}
is UnarchiveHabitsCommand -> {
return activity.resources.getQuantityString(
R.plurals.toast_habits_unarchived,
command.selected.size
)
}
else -> return null
}
}
@@ -335,9 +350,11 @@ class ListHabitsScreen
adapter.refresh()
activity.showMessage(activity.resources.getString(R.string.habits_imported))
}
ImportDataTask.NOT_RECOGNIZED -> {
activity.showMessage(activity.resources.getString(R.string.file_not_recognized))
}
else -> {
activity.showMessage(activity.resources.getString(R.string.could_not_import))
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
* Copyright (C) 2016-2025 Álinson Santos Xavier <git@axavier.org>
*
* This file is part of Loop Habit Tracker.
*

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