-
Notifications
You must be signed in to change notification settings - Fork 31
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 #1711 from novasamatech/fix/portfolio-view
Fix/portfolio view
- Loading branch information
Showing
53 changed files
with
277 additions
and
118 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
33 changes: 33 additions & 0 deletions
33
app/src/main/res/navigation/select_swap_token_nav_graph.xml
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,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<navigation xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
app:startDestination="@id/selectAssetSwapFlowFragment" | ||
android:id="@+id/select_swap_token_nav_graph"> | ||
|
||
<fragment | ||
android:id="@+id/selectAssetSwapFlowFragment" | ||
android:name="io.novafoundation.nova.feature_assets.presentation.swap.asset.AssetSwapFlowFragment" | ||
android:label="AssetSwapFlowFragment"> | ||
|
||
<action | ||
android:id="@+id/action_selectAssetSwapFlowFragment_to_swapFlowNetworkFragment" | ||
app:destination="@id/swapFlowNetworkFragment" | ||
app:enterAnim="@anim/fragment_open_enter" | ||
app:exitAnim="@anim/fragment_open_exit" | ||
app:popEnterAnim="@anim/fragment_close_enter" | ||
app:popExitAnim="@anim/fragment_close_exit" /> | ||
</fragment> | ||
|
||
<fragment | ||
android:id="@+id/swapFlowNetworkFragment" | ||
android:name="io.novafoundation.nova.feature_assets.presentation.swap.network.NetworkSwapFlowFragment" | ||
android:label="NetworkSwapFlowFragment" /> | ||
|
||
<action | ||
android:id="@+id/action_return_to_swap_settings" | ||
app:popUpTo="@id/swapSettingsFragment" | ||
app:enterAnim="@anim/fragment_close_enter" | ||
app:exitAnim="@anim/fragment_close_exit" | ||
app:popEnterAnim="@anim/fragment_open_enter" | ||
app:popExitAnim="@anim/fragment_open_exit" /> | ||
</navigation> |
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
File renamed without changes.
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
30 changes: 30 additions & 0 deletions
30
.../src/main/java/io/novafoundation/nova/common/domain/interactor/AssetViewModeInteractor.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,30 @@ | ||
package io.novafoundation.nova.common.domain.interactor | ||
|
||
import io.novafoundation.nova.common.data.model.AssetViewMode | ||
import io.novafoundation.nova.common.data.repository.AssetsViewModeRepository | ||
import kotlinx.coroutines.flow.Flow | ||
|
||
interface AssetViewModeInteractor { | ||
|
||
fun getAssetViewMode(): AssetViewMode | ||
|
||
fun assetsViewModeFlow(): Flow<AssetViewMode> | ||
|
||
suspend fun setAssetsViewMode(assetsViewMode: AssetViewMode) | ||
} | ||
|
||
class RealAssetViewModeInteractor( | ||
private val assetsViewModeRepository: AssetsViewModeRepository | ||
) : AssetViewModeInteractor { | ||
override fun getAssetViewMode(): AssetViewMode { | ||
return assetsViewModeRepository.getAssetViewMode() | ||
} | ||
|
||
override fun assetsViewModeFlow(): Flow<AssetViewMode> { | ||
return assetsViewModeRepository.assetsViewModeFlow() | ||
} | ||
|
||
override suspend fun setAssetsViewMode(assetsViewMode: AssetViewMode) { | ||
assetsViewModeRepository.setAssetsViewMode(assetsViewMode) | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path | ||
android:pathData="M11.8099,1.152C11.8556,0.9493 12.1444,0.9493 12.1901,1.152L13.608,7.4464C13.9387,8.9147 15.0853,10.0613 16.5536,10.392L22.848,11.8099C23.0507,11.8556 23.0507,12.1444 22.848,12.1901L16.5536,13.608C15.0853,13.9387 13.9387,15.0853 13.608,16.5536L12.1901,22.848C12.1444,23.0507 11.8556,23.0507 11.8099,22.848L10.392,16.5536C10.0613,15.0853 8.9147,13.9387 7.4464,13.608L1.152,12.1901C0.9493,12.1444 0.9493,11.8556 1.152,11.8099L7.4464,10.392C8.9147,10.0613 10.0613,8.9147 10.392,7.4464L11.8099,1.152Z" | ||
android:fillColor="#ffffff"/> | ||
android:viewportWidth="48" | ||
android:viewportHeight="48"> | ||
|
||
<path | ||
android:fillColor="#ffffff" | ||
android:pathData="M42,23.527V24.473C39.059,24.938 32.752,26.028 29.65,27.214C28.544,27.638 27.663,28.512 27.23,29.61C26.036,32.695 24.938,39.043 24.473,42H23.527C23.054,39.051 21.964,32.703 20.77,29.61C20.337,28.504 19.456,27.63 18.35,27.214C15.248,26.028 8.941,24.938 6,24.473V23.527C8.941,23.062 15.248,21.972 18.35,20.786C19.456,20.361 20.337,19.488 20.77,18.39C21.964,15.304 23.062,8.957 23.527,6H24.473C24.946,8.949 26.036,15.296 27.23,18.39C27.663,19.496 28.544,20.369 29.65,20.786C32.752,21.972 39.059,23.062 42,23.527Z" /> | ||
|
||
</vector> |
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,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="32dp" | ||
android:height="32dp" | ||
android:viewportWidth="32" | ||
android:viewportHeight="32"> | ||
<path | ||
android:pathData="M9.271,16.213C8.774,15.717 7.969,15.717 7.472,16.213C6.976,16.709 6.976,17.513 7.472,18.009L15.101,25.628C15.598,26.124 16.403,26.124 16.899,25.628L24.528,18.009C25.024,17.513 25.024,16.709 24.528,16.213C24.031,15.717 23.226,15.717 22.73,16.213L17.271,21.664V7.267C17.271,6.565 16.702,6 16,6C15.298,6 14.729,6.565 14.729,7.267V21.664L9.271,16.213Z" | ||
android:fillColor="#ffffff"/> | ||
</vector> |
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,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="32dp" | ||
android:height="32dp" | ||
android:viewportWidth="32" | ||
android:viewportHeight="32"> | ||
<path | ||
android:pathData="M22.629,15.787C23.126,16.283 23.931,16.283 24.428,15.787C24.924,15.291 24.924,14.487 24.428,13.991L16.799,6.372C16.302,5.876 15.498,5.876 15.001,6.372L7.372,13.991C6.876,14.487 6.876,15.291 7.372,15.787C7.869,16.283 8.674,16.283 9.17,15.787L14.629,10.335L14.629,24.733C14.629,25.435 15.198,26 15.9,26C16.602,26 17.171,25.435 17.171,24.733L17.171,10.335L22.629,15.787Z" | ||
android:fillColor="#ffffff"/> | ||
</vector> |
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,10 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="32dp" | ||
android:height="32dp" | ||
android:viewportWidth="32" | ||
android:viewportHeight="32"> | ||
<path | ||
android:pathData="M22.233,7.101C24.113,7.88 25.163,8.985 25.2,10.219V11C25.2,11.287 24.966,11.736 24.542,12.102C24.042,12.537 23.299,12.965 22.395,13.34C20.469,14.139 18.022,14.616 15.85,14.616C13.677,14.616 11.231,14.141 9.305,13.342C8.401,12.967 7.658,12.538 7.158,12.104C6.734,11.736 6.5,11.286 6.5,11L6.504,10.212C6.542,8.981 7.593,7.878 9.471,7.101C11.187,6.391 13.452,6 15.85,6C18.248,6 20.513,6.391 22.233,7.101ZM8.751,22.295C10.843,23.16 13.497,23.678 15.85,23.678C18.203,23.678 20.857,23.16 22.949,22.295C23.669,21.993 24.292,21.517 24.81,21.121L24.911,21.044C24.938,21.024 24.969,21.012 25.003,21.008C25.036,21.005 25.07,21.011 25.1,21.026C25.13,21.041 25.155,21.064 25.173,21.092C25.191,21.12 25.2,21.153 25.2,21.186V21.748C25.2,23.001 24.144,24.125 22.227,24.91C20.511,25.613 18.247,26 15.85,26C13.453,26 11.188,25.613 9.473,24.91C7.556,24.124 6.5,23.001 6.5,21.748V21.186C6.5,21.153 6.509,21.12 6.527,21.092C6.545,21.064 6.57,21.041 6.6,21.026C6.63,21.011 6.664,21.005 6.697,21.008C6.731,21.012 6.762,21.024 6.789,21.044L6.885,21.118C7.404,21.514 8.028,21.992 8.751,22.295ZM22.949,14.66C20.857,15.528 18.203,16.044 15.85,16.044C13.497,16.044 10.843,15.528 8.751,14.66C8.025,14.358 7.398,13.877 6.878,13.478L6.789,13.41C6.762,13.39 6.73,13.377 6.697,13.374C6.663,13.371 6.629,13.377 6.599,13.392C6.569,13.408 6.544,13.431 6.526,13.459C6.509,13.488 6.5,13.521 6.5,13.554V14.928C6.5,15.214 6.734,15.575 7.158,15.943C7.658,16.378 8.401,16.806 9.305,17.181C11.231,17.979 13.677,18.455 15.85,18.455C18.022,18.455 20.469,17.978 22.395,17.18C23.299,16.804 24.042,16.376 24.542,15.941C24.966,15.574 25.2,15.214 25.2,14.928V13.554C25.2,13.521 25.191,13.488 25.173,13.46C25.155,13.432 25.13,13.409 25.1,13.394C25.07,13.379 25.036,13.373 25.003,13.376C24.969,13.379 24.938,13.392 24.911,13.412L24.811,13.488C24.293,13.884 23.67,14.361 22.949,14.66ZM15.85,19.884C18.203,19.884 20.857,19.366 22.949,18.5C23.67,18.199 24.293,17.723 24.811,17.327C24.845,17.301 24.878,17.276 24.911,17.251C24.938,17.23 24.969,17.218 25.003,17.215C25.036,17.212 25.07,17.218 25.1,17.232C25.13,17.247 25.155,17.27 25.173,17.298C25.191,17.327 25.2,17.359 25.2,17.393V18.723C25.2,19.007 24.966,19.368 24.542,19.736C24.042,20.171 23.299,20.599 22.395,20.974C20.469,21.773 18.023,22.25 15.85,22.25C13.677,22.25 11.231,21.773 9.305,20.975C8.401,20.6 7.658,20.172 7.157,19.737C6.734,19.369 6.5,19.009 6.5,18.723V17.393C6.5,17.359 6.509,17.326 6.527,17.298C6.544,17.27 6.57,17.247 6.6,17.232C6.63,17.217 6.663,17.211 6.697,17.214C6.73,17.217 6.762,17.229 6.789,17.25C6.82,17.274 6.852,17.298 6.884,17.322C7.403,17.72 8.028,18.198 8.751,18.5C10.843,19.366 13.497,19.884 15.85,19.884Z" | ||
android:fillColor="#ffffff" | ||
android:fillType="evenOdd"/> | ||
</vector> |
Oops, something went wrong.