-
Notifications
You must be signed in to change notification settings - Fork 0
Timed sheets #413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Timed sheets #413
Changes from all commits
Commits
Show all changes
98 commits
Select commit
Hold shift + click to select a range
d6ff00a
chore: organize categories in an enum
jvsena42 852cb98
feat: high balance rule
jvsena42 d1f827b
chore: move app update sheet logic to home
jvsena42 da98bcd
feat: backup sheet logic
jvsena42 d7ece6e
feat: notifications sheet logic
jvsena42 d3d8f64
feat: quick pay sheet logic
jvsena42 f109ad9
fix: notifications interval
jvsena42 03c12c7
feat: trigger timed sheet check
jvsena42 c93b4bd
feat: quick pay intro sheet
jvsena42 5daab99
feat: display backup
jvsena42 61584ca
feat: display update sheet
jvsena42 4aee4d5
feat: display quick pay sheet
jvsena42 7e42de3
feat: save notifications preferences
jvsena42 f4355e2
feat: BackgroundPaymentsIntroScreen.kt
jvsena42 36b08b1
feat: BackgroundPaymentsIntroSheet.kt
jvsena42 4150438
feat: BackgroundPaymentsSettings.kt WIP
jvsena42 f95acc9
feat: BackgroundPaymentsSettings.kt WIP
jvsena42 ab4419e
feat: NotificationPreview.kt WIP
jvsena42 57565b3
feat: text style
jvsena42 7ed0ce8
feat: overlay disabled
jvsena42 b9fd508
feat: set notification icon
jvsena42 576e5ff
feat: warning disabled notifications
jvsena42 13e7750
feat: settings notification settings button
jvsena42 37e4a61
feat: save notification details preference
jvsena42 ae1a214
feat: bell icon
jvsena42 60bcbf1
feat: navigation
jvsena42 e89ad71
feat: settings navigation
jvsena42 b7200ef
feat: save permission change
jvsena42 f6ba2dd
fix: notification update caching
jvsena42 015cbce
feat: animate description
jvsena42 40a29c4
feat: handle continue from sheet
jvsena42 9974a46
chore: logs
jvsena42 29e8e10
chore: dismiss sheet before navigate
jvsena42 60896f1
fix: display backup intro
jvsena42 11223bc
fix: implement bottom sheet to update
jvsena42 3510a58
fix: quick pay navigation
jvsena42 bc95f47
chore: code clean up
jvsena42 ab9c30d
feat: notification body
jvsena42 3b5c77a
feat: critical update navigation
jvsena42 d81844e
fix: check delay 2 seconds
jvsena42 11b1a1b
Merge branch 'master' into feat/time-sheet-polish
jvsena42 12f1454
chore: code cleanup
jvsena42 6139161
chore: lint
jvsena42 f67c3bf
chore: lint
jvsena42 a4c96d9
chore: scope lazy initialization
jvsena42 176b35c
fix: label
jvsena42 d5def7b
fix: don't show quick pay sheet if already enabled
jvsena42 0135263
fix: small icon
jvsena42 bd4ed2e
fix: gradient bg
jvsena42 5ee1d8b
chore: restore comments
jvsena42 10242d9
chore: vertical spacer
jvsena42 699e35a
chore: vertical spacer
jvsena42 c00024b
chore: vertical spacer
jvsena42 7dca72f
chore: clean imports
jvsena42 9475c22
fix: don't show notifications sheet if user have no spending balance
jvsena42 e4d0601
fix: don't show notifications sheet if user have no spending balance
jvsena42 8ab0a03
fix: empty state update
jvsena42 76222b8
fix: check quick pay intro as seen after display for the first time
jvsena42 fcd32c9
chore: imports
jvsena42 a393204
fix: route name
jvsena42 b170713
fix: trigger timed cheats check on balance change
jvsena42 68debe1
fix: implement queue logic
jvsena42 1cd10a2
fix: sort
jvsena42 6dc6ffa
chore: lift dismiss callback
jvsena42 5d5e3cc
chore: logs
jvsena42 0ea0bf1
chore: implement sheet host
jvsena42 aadfdfb
chore: lint
jvsena42 1918111
fix: add a bottom sheet wrapper to don't be render behind TabBar
jvsena42 c3c87cd
fix: set as seen after dismiss
jvsena42 f9420c2
fix: reimplement rememberUpdatedState
jvsena42 06d07d4
fix: checkTimedSheets on balance change
jvsena42 20e25e9
Merge branch 'master' into feat/time-sheet-polish
jvsena42 323c067
chore: solve conflicts
jvsena42 018eced
fix: quickpay intro seen update
jvsena42 dd80166
Merge branch 'master' into feat/time-sheet-polish
jvsena42 eb15d59
Merge branch 'master' into feat/time-sheet-polish
jvsena42 6606ed3
chore: formating
jvsena42 26f6bdf
Merge branch 'master' into feat/time-sheet-polish
jvsena42 321f20f
fix: don't clear processed payment list
jvsena42 2045d30
chore: replace DisposableEffect with LaunchedEffect
jvsena42 d85b70b
chore: move timed sheets to parent
jvsena42 b271df8
chore: remove unnecessary state
jvsena42 627f3df
fix: timed sheet dismiss
jvsena42 af409e6
chore: remove sheet wrapper
jvsena42 a58a1a8
chore: lint
jvsena42 d1c3f96
chore: lint
jvsena42 b5e63a9
chore: lint
jvsena42 df850e6
chore: lint
jvsena42 dd2aa5d
chore: lint
jvsena42 208bad8
fix: don't display notifications intro if already granted
jvsena42 0163101
chore: lint
jvsena42 0c99fea
chore: add comment
jvsena42 75b09e8
feat: display notifications settings
jvsena42 a58768b
chore: remove animation
jvsena42 84e228d
fix: listen for balance change
jvsena42 c367549
chore: add log
jvsena42 90aedea
fix: skip queue check
jvsena42 ad69db7
Merge pull request #435 from synonymdev/chore/move-to-parent
jvsena42 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
app/src/main/java/to/bitkit/ui/components/NotificationPreview.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
package to.bitkit.ui.components | ||
|
||
import androidx.compose.animation.AnimatedContent | ||
import androidx.compose.foundation.Image | ||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.draw.clip | ||
import androidx.compose.ui.res.painterResource | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.dp | ||
import to.bitkit.R | ||
import to.bitkit.ui.theme.AppThemeSurface | ||
import to.bitkit.ui.theme.Colors | ||
import to.bitkit.ui.theme.Shapes | ||
|
||
@Composable | ||
fun NotificationPreview( | ||
enabled: Boolean, | ||
title: String, | ||
description: String, | ||
showDetails: Boolean, | ||
modifier: Modifier = Modifier, | ||
) { | ||
Box(modifier = modifier) { | ||
Row( | ||
horizontalArrangement = Arrangement.spacedBy(8.dp), | ||
modifier = Modifier | ||
.clip(Shapes.medium) | ||
.background(Colors.White80) | ||
.padding(9.dp) | ||
) { | ||
Image( | ||
painter = painterResource(R.drawable.ic_notification), | ||
contentDescription = null, | ||
modifier = Modifier | ||
.size(38.dp) | ||
) | ||
|
||
Column( | ||
modifier = Modifier.weight(1f), | ||
verticalArrangement = Arrangement.SpaceBetween | ||
) { | ||
BodySSB(text = title, color = Colors.Black) | ||
val textDescription = if (showDetails) description else "Open Bitkit to see details" // TODO Transifex | ||
jvsena42 marked this conversation as resolved.
Show resolved
Hide resolved
jvsena42 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
AnimatedContent(targetState = textDescription) { text -> | ||
Footnote(text = text, color = Colors.Gray3) | ||
} | ||
} | ||
|
||
Caption("3m ago", color = Colors.Gray2) | ||
} | ||
|
||
if (!enabled) { | ||
Box( | ||
modifier = Modifier | ||
.matchParentSize() | ||
.clip(Shapes.medium) | ||
.background(Colors.Black70) | ||
) | ||
} | ||
} | ||
} | ||
|
||
@Preview(showSystemUi = true) | ||
@Composable | ||
private fun Preview() { | ||
AppThemeSurface { | ||
Column( | ||
modifier = Modifier | ||
.fillMaxSize() | ||
.padding(8.dp), | ||
verticalArrangement = Arrangement.Center | ||
) { | ||
NotificationPreview( | ||
enabled = true, | ||
title = "Payment Received", | ||
description = "₿ 21 000", | ||
showDetails = true, | ||
modifier = Modifier.fillMaxWidth() | ||
) | ||
VerticalSpacer(16.dp) | ||
NotificationPreview( | ||
enabled = false, | ||
title = "Payment Received", | ||
description = "₿ 21 000", | ||
showDetails = false, | ||
modifier = Modifier.fillMaxWidth() | ||
) | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be used to #134 , didn't implemented here because the PR is already big