Skip to content

Commit

Permalink
Postpone tasks and enhanced notifications (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
costular authored Oct 18, 2023
1 parent 0ee8959 commit 3830a41
Show file tree
Hide file tree
Showing 127 changed files with 2,491 additions and 642 deletions.
30 changes: 18 additions & 12 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Add ability to postpone reminders dynamically, before only one hour was the only choice
-

### Changed
- Enhanced notification logic moving the code into a module to encapsulate it
- Use USE_EXACT_ALARM and add rationale when it SCHUDULE_EXACT_ALARM get revoked, just in case in the future we don't have access to USE_EXACT_ALARM you never know when it depends on Google :D
- Notification permission handling has been improved and now a rationale is shown when the user revokes the permission. Also, it's dynamic, as soon as the permission gets granted even via settings the app will be refreshed

### Deprecated

### Removed

### Fixed
- Fixed an issue that opened the app many times when tapping on notifications
- Fixed an issue when editing or postponing a reminder
- Fixed the ability to set reminders for the past which means that the notification is instantly fired

### Security


## [2.0.0] 2023-09-18

### Added
Expand Down
3 changes: 2 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,14 @@ configurations {
dependencies {
implementation(project(":core:ui"))
implementation(project(":core:designsystem"))
implementation(projects.core.notifications)
implementation(project(":data"))
implementation(project(":feature:agenda"))
implementation(project(":feature:createtask"))
implementation(project(":feature:settings"))
implementation(projects.common.tasks)
implementation(projects.feature.edittask)
implementation(projects.feature.postponeTask)

implementation(libs.fragment)
implementation(libs.compose.ui)
Expand All @@ -104,7 +106,6 @@ dependencies {
implementation(libs.timber)
implementation(libs.hilt)
kapt(libs.hilt.compiler)
kapt(libs.hilt.androidx.compiler)
implementation(libs.hilt.work)
implementation(libs.hilt.navigation.compose)
implementation(libs.startup)
Expand Down
1 change: 1 addition & 0 deletions app/config/detekt/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ style:
excludeImportStatements: true
excludeCommentStatements: false
excludeRawStrings: true
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**']
MayBeConst:
active: true
ModifierOrder:
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package="com.costular.atomtasks">

<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

<application
Expand All @@ -17,7 +17,7 @@
android:supportsRtl="true"
android:theme="@style/Theme.AtomTasks">
<activity
android:name=".ui.home.MainActivity"
android:name="com.costular.atomtasks.ui.home.MainActivity"
android:exported="true"
android:theme="@style/Theme.AtomTasks"
android:windowSoftInputMode="adjustResize">
Expand Down

This file was deleted.

This file was deleted.

4 changes: 4 additions & 0 deletions build-logic/convention/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,9 @@ gradlePlugin {
id = "atomtasks.android.room"
implementationClass = "AndroidRoomConventionPlugin"
}
register("androidHilt") {
id = "atomtasks.android.hilt"
implementationClass = "AndroidHiltConventionPlugin"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class AndroidFeatureConventionPlugin : Plugin<Project> {
add("implementation", libs.findLibrary("accompanist.systemui").get())
add("implementation", libs.findLibrary("viewmodel").get())
add("implementation", libs.findLibrary("hilt.navigation.compose").get())
add("kapt", libs.findLibrary("hilt.androidx.compiler").get())
add("kapt", libs.findLibrary("hilt.compiler").get())
add("implementation", libs.findLibrary("hilt").get())
add("kapt", libs.findLibrary("hilt.compiler").get())
add("implementation", libs.findLibrary("compose.destinations").get())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.VersionCatalogsExtension
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.getByType

class AndroidHiltConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
apply("dagger.hilt.android.plugin")
// KAPT must go last to avoid build warnings.
// See: https://stackoverflow.com/questions/70550883/warning-the-following-options-were-not-recognized-by-any-processor-dagger-f
apply("org.jetbrains.kotlin.kapt")
}

val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")

dependencies {
"implementation"(libs.findLibrary("hilt").get())
"kapt"(libs.findLibrary("hilt.compiler").get())
"kaptAndroidTest"(libs.findLibrary("hilt.compiler").get())
"kaptTest"(libs.findLibrary("hilt.compiler").get())
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ internal fun Project.configureAndroidCompose(
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + buildComposeMetricsParameters()
}

testOptions {
unitTests {
// For Robolectric
isIncludeAndroidResources = true
}
}
}
}

Expand Down
Loading

0 comments on commit 3830a41

Please sign in to comment.