Finalizing Connection transitions
-optimized transition animations into single av_* drawables. -Moved back toolbar from MainActivity to ConnectFragment as the progressbar is only heavily used in ConnectFragment. -ConnectFragmentViewModel optimized, made it reactive with StateFlow, and solved animation discrepancy in case of stopping and resuming activity
Merge request reports
Activity
@ankitgusai19 is this still in draft? Do you plan to fix the mentioned issues
within this MR or in a subsequent?cool stuff, @ankitgusai19 it looks very nice :). Also I saw some nice code improvements around the state handling
One bug I ran into is when I switch between the bottom tabs the UI is not restored correctly.91 ConnectionState.INIT -> { 92 binding.tvConnectActionBtn.setBackgroundResource(R.drawable.av_green_to_purple) 93 binding.tvConnectActionBtn.setText(R.string.frag_connect_connect) 94 binding.ivConnectBtnOverlay.visibility = View.GONE 95 } 96 ConnectionState.CONNECTING -> { 97 if (vpnState.animate) { 98 idleToConnectingTransition() 82 private fun setUIState(vpnState: ConnectionState) { 83 if (::currentVpnState.isInitialized && currentVpnState == vpnState) { 84 return 85 } 86 87 when (vpnState) { 88 ConnectionState.INIT -> {} 89 ConnectionState.CONNECTING -> idleToConnectingTransition() deducing the last state is maybe too opinionated and might be error prone.
I would prefer if we either compare the last state so that we can for example make sure
idleToConnectingTransition
is the right transition between the last and the current state. Alternatively the transitions need to be double checked how generic they are, so that they animate correctly between different last states to the current one. Did you do that already?Edited by cybertachanged this line in version 5 of the diff
mentioned in issue #39 (closed)
Btw, @cyberta This commit also has the custom switch that you can use in the configuration part.
I should be able to wrap this MR by the end of this week :), which more or less completes pre-alpha design for connect.
Edited by ankitgusai19- Resolved by cyberta
- Resolved by cyberta
- Resolved by cyberta
- Resolved by cyberta