File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
vector/src/main/java/im/vector/app/features/crypto/recover Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import android.view.LayoutInflater
21
21
import android.view.View
22
22
import android.view.ViewGroup
23
23
import androidx.core.view.isVisible
24
+ import androidx.lifecycle.ViewModelProvider
24
25
import com.airbnb.mvrx.parentFragmentViewModel
25
26
import com.airbnb.mvrx.withState
26
27
import dagger.hilt.android.AndroidEntryPoint
@@ -43,6 +44,12 @@ class BootstrapReAuthFragment :
43
44
44
45
views.bootstrapRetryButton.debouncedClicks { submit() }
45
46
views.bootstrapCancelButton.debouncedClicks { cancel() }
47
+
48
+ val viewModel = ViewModelProvider (this ).get(BootstrapReAuthViewModel ::class .java)
49
+ if (! viewModel.isFirstSubmitDone) {
50
+ viewModel.isFirstSubmitDone = true
51
+ submit()
52
+ }
46
53
}
47
54
48
55
private fun submit () = withState(sharedViewModel) { state ->
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2024 New Vector Ltd
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ package im.vector.app.features.crypto.recover
18
+
19
+ import androidx.lifecycle.ViewModel
20
+
21
+ class BootstrapReAuthViewModel : ViewModel () {
22
+ var isFirstSubmitDone = false
23
+ }
You can’t perform that action at this time.
0 commit comments