This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 722
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #934 from ILIYANGERMANOV/develop
Develop
- Loading branch information
Showing
166 changed files
with
1,794 additions
and
1,225 deletions.
There are no files selected for viewing
This file contains 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 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 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 |
---|---|---|
|
@@ -35,4 +35,6 @@ object Constants { | |
const val SWIPE_DOWN_THRESHOLD_OPEN_MORE_MENU = 200 | ||
|
||
const val SWIPE_UP_EXPANDED_THRESHOLD = 200 | ||
|
||
const val SUPPORT_EMAIL = "[email protected]" | ||
} |
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/ivy/wallet/domain/action/account/AccTrnsAct.kt
This file contains 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
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/ivy/wallet/domain/action/account/AccountByIdAct.kt
This file contains 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
2 changes: 1 addition & 1 deletion
2
app/src/main/java/com/ivy/wallet/domain/action/account/AccountsAct.kt
This file contains 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
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/ivy/wallet/domain/action/account/CalcAccBalanceAct.kt
This file contains 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
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/ivy/wallet/domain/action/account/CalcAccIncomeExpenseAct.kt
This file contains 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
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/ivy/wallet/domain/action/budget/BudgetsAct.kt
This file contains 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
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/ivy/wallet/domain/action/category/CategoriesAct.kt
This file contains 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
2 changes: 1 addition & 1 deletion
2
app/src/main/java/com/ivy/wallet/domain/action/category/CategoryByIdAct.kt
This file contains 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 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
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/ivy/wallet/domain/action/category/CategoryTrnsBetweenAct.kt
This file contains 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
2 changes: 1 addition & 1 deletion
2
app/src/main/java/com/ivy/wallet/domain/action/charts/BalanceChartAct.kt
This file contains 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
12 changes: 6 additions & 6 deletions
12
app/src/main/java/com/ivy/wallet/domain/action/charts/PieChartAct.kt
This file contains 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
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/ivy/wallet/domain/action/exchange/ExchangeAct.kt
This file contains 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
20 changes: 20 additions & 0 deletions
20
app/src/main/java/com/ivy/wallet/domain/action/global/StartDayOfMonthAct.kt
This file contains 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,20 @@ | ||
package com.ivy.wallet.domain.action.global | ||
|
||
import com.ivy.frp.action.FPAction | ||
import com.ivy.frp.then | ||
import com.ivy.wallet.io.persistence.SharedPrefs | ||
import com.ivy.wallet.ui.IvyWalletCtx | ||
import javax.inject.Inject | ||
|
||
class StartDayOfMonthAct @Inject constructor( | ||
private val sharedPrefs: SharedPrefs, | ||
private val ivyWalletCtx: IvyWalletCtx | ||
) : FPAction<Unit, Int>() { | ||
|
||
override suspend fun Unit.compose(): suspend () -> Int = suspend { | ||
sharedPrefs.getInt(SharedPrefs.START_DATE_OF_MONTH, 1) | ||
} then { startDay -> | ||
ivyWalletCtx.setStartDayOfMonth(startDay) | ||
startDay | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
app/src/main/java/com/ivy/wallet/domain/action/global/UpdateStartDayOfMonthAct.kt
This file contains 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,34 @@ | ||
package com.ivy.wallet.domain.action.global | ||
|
||
import com.ivy.frp.action.FPAction | ||
import com.ivy.frp.monad.Res | ||
import com.ivy.frp.monad.thenIfSuccess | ||
import com.ivy.wallet.io.persistence.SharedPrefs | ||
import com.ivy.wallet.ui.IvyWalletCtx | ||
import javax.inject.Inject | ||
|
||
class UpdateStartDayOfMonthAct @Inject constructor( | ||
private val sharedPrefs: SharedPrefs, | ||
private val ivyWalletCtx: IvyWalletCtx | ||
) : FPAction<Int, Res<String, Int>>() { | ||
|
||
override suspend fun Int.compose(): suspend () -> Res<String, Int> = suspend { | ||
val startDay = this | ||
|
||
if (startDay in 1..31) { | ||
Res.Ok(startDay) | ||
} else { | ||
Res.Err("Invalid start day $startDay. Start date must be between 1 and 31.") | ||
} | ||
} thenIfSuccess { startDay -> | ||
sharedPrefs.putInt(SharedPrefs.START_DATE_OF_MONTH, startDay) | ||
ivyWalletCtx.setStartDayOfMonth(startDay) | ||
Res.Ok(startDay) | ||
} thenIfSuccess { startDay -> | ||
ivyWalletCtx.initSelectedPeriodInMemory( | ||
startDayOfMonth = startDay, | ||
forceReinitialize = true | ||
) | ||
Res.Ok(startDay) | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
app/src/main/java/com/ivy/wallet/domain/action/loan/LoanByIdAct.kt
This file contains 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
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/ivy/wallet/domain/action/loan/LoansAct.kt
This file contains 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
2 changes: 1 addition & 1 deletion
2
app/src/main/java/com/ivy/wallet/domain/action/settings/BaseCurrencyAct.kt
This file contains 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
2 changes: 1 addition & 1 deletion
2
app/src/main/java/com/ivy/wallet/domain/action/settings/CalcBufferDiffAct.kt
This file contains 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
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/ivy/wallet/domain/action/settings/SettingsAct.kt
This file contains 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
15 changes: 15 additions & 0 deletions
15
app/src/main/java/com/ivy/wallet/domain/action/settings/UpdateSettingsAct.kt
This file contains 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,15 @@ | ||
package com.ivy.wallet.domain.action.settings | ||
|
||
import com.ivy.frp.action.FPAction | ||
import com.ivy.wallet.domain.data.core.Settings | ||
import com.ivy.wallet.io.persistence.dao.SettingsDao | ||
import javax.inject.Inject | ||
|
||
class UpdateSettingsAct @Inject constructor( | ||
private val settingsDao: SettingsDao | ||
) : FPAction<Settings, Settings>() { | ||
override suspend fun Settings.compose(): suspend () -> Settings = suspend { | ||
settingsDao.save(this.toEntity()) | ||
this | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/ivy/wallet/domain/action/transaction/AllTrnsAct.kt
This file contains 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
5 changes: 2 additions & 3 deletions
5
app/src/main/java/com/ivy/wallet/domain/action/transaction/CalcTrnsIncomeExpenseAct.kt
This file contains 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
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/ivy/wallet/domain/action/transaction/DueTrnsAct.kt
This file contains 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.