@@ -6,10 +6,10 @@ import android.view.View.GONE
6
6
import android.view.View.INVISIBLE
7
7
import android.view.View.VISIBLE
8
8
import android.widget.Button
9
- import android.widget.ProgressBar
9
+ // import android.widget.ProgressBar
10
10
import android.widget.TextView
11
- import androidx.appcompat.widget.SwitchCompat
12
- import androidx.constraintlayout.widget.ConstraintLayout
11
+ // import androidx.appcompat.widget.SwitchCompat
12
+ // import androidx.constraintlayout.widget.ConstraintLayout
13
13
import androidx.core.os.bundleOf
14
14
import androidx.fragment.app.Fragment
15
15
import androidx.fragment.app.viewModels
@@ -26,8 +26,8 @@ import org.nypl.simplified.accounts.api.AccountLoginState.AccountLoggingInWaitin
26
26
import org.nypl.simplified.accounts.api.AccountLoginState.AccountLoginFailed
27
27
import org.nypl.simplified.accounts.api.AccountLoginState.AccountNotLoggedIn
28
28
import org.nypl.simplified.android.ktx.supportActionBar
29
- import org.nypl.simplified.bookmarks.api.BookmarkSyncEnableResult
30
- import org.nypl.simplified.bookmarks.api.BookmarkSyncEnableStatus
29
+ // import org.nypl.simplified.bookmarks.api.BookmarkSyncEnableResult
30
+ // import org.nypl.simplified.bookmarks.api.BookmarkSyncEnableStatus
31
31
import org.nypl.simplified.listeners.api.FragmentListenerType
32
32
import org.nypl.simplified.listeners.api.fragmentListeners
33
33
import org.nypl.simplified.profiles.controller.api.ProfileAccountLoginRequest
@@ -67,17 +67,20 @@ class EKirjastoAccountFragment : Fragment(R.layout.account_ekirjasto){
67
67
private lateinit var buttonRegisterPasskey: Button
68
68
private lateinit var buttonDependents: Button
69
69
private lateinit var eulaStatement: TextView
70
+ /*
71
+ Bookmark syncing is not currently supported in E-kirjasto
70
72
private lateinit var syncBookmarks: ConstraintLayout
73
+ private lateinit var bookmarkSyncProgress: ProgressBar
74
+ private lateinit var bookmarkSyncCheck: SwitchCompat
75
+ private lateinit var bookmarkStatement: TextView
76
+ */
71
77
private lateinit var buttonFeedback: Button
72
78
private lateinit var buttonPrivacyPolicy: Button
73
79
private lateinit var buttonUserAgreement: Button
74
80
private lateinit var buttonAccessibilityStatement: Button
75
81
private lateinit var buttonLicenses: Button
76
82
private lateinit var buttonInstructions: Button
77
83
private lateinit var versionText: TextView
78
- private lateinit var bookmarkSyncProgress: ProgressBar
79
- private lateinit var bookmarkSyncCheck: SwitchCompat
80
- private lateinit var bookmarkStatement: TextView
81
84
private lateinit var buttonPreferences: Button
82
85
83
86
// inherited elements
@@ -109,30 +112,34 @@ class EKirjastoAccountFragment : Fragment(R.layout.account_ekirjasto){
109
112
this .buttonDependents = view.findViewById(R .id.buttonInviteDependents)
110
113
this .eulaStatement = view.findViewById(R .id.eulaStatement)
111
114
this .buttonAccessibilityStatement = view.findViewById(R .id.accessibilityStatement)
112
- this .syncBookmarks = view.findViewById(R .id.accountSyncBookmarks)
113
- this .bookmarkStatement = view.findViewById(R .id.accountSyncBookmarksStatement)
115
+ // this.syncBookmarks = view.findViewById(R.id.accountSyncBookmarks)
116
+ // this.bookmarkStatement = view.findViewById(R.id.accountSyncBookmarksStatement)
114
117
this .buttonFeedback = view.findViewById(R .id.buttonFeedback)
115
118
this .buttonPrivacyPolicy = view.findViewById(R .id.buttonPrivacyPolicy)
116
119
this .buttonUserAgreement = view.findViewById(R .id.buttonUserAgreement)
117
120
this .buttonLicenses = view.findViewById(R .id.buttonLicenses)
118
121
this .buttonInstructions = view.findViewById(R .id.buttonInstructions)
119
122
this .versionText = view.findViewById(R .id.appVersion)
120
- this .bookmarkSyncCheck = view.findViewById(R .id.accountSyncBookmarksCheck)
123
+ // this.bookmarkSyncCheck = view.findViewById(R.id.accountSyncBookmarksCheck)
121
124
this .buttonPreferences = view.findViewById(R .id.buttonPreferences)
122
125
123
126
124
127
this .toolbar =
125
128
view.rootView.findViewWithTag(PalaceToolbar .palaceToolbarName)
129
+ /*
126
130
this.bookmarkSyncProgress =
127
131
view.findViewById(R.id.accountSyncProgress)
132
+ */
128
133
129
134
this .viewModel.accountLive.observe(this .viewLifecycleOwner) {
130
135
this .reconfigureAccountUI()
131
136
}
132
137
138
+ /*
133
139
this.viewModel.accountSyncingSwitchStatus.observe(this.viewLifecycleOwner){ status ->
134
140
this.reconfigureBookmarkSyncingSwitch(status)
135
141
}
142
+ */
136
143
137
144
this .reconfigureAccountUI()
138
145
}
@@ -157,13 +164,13 @@ class EKirjastoAccountFragment : Fragment(R.layout.account_ekirjasto){
157
164
onTryRegisterPasskey()
158
165
}
159
166
160
- /*
161
- * Configure the bookmark syncing switch to enable/disable syncing permissions.
162
- */
167
+ /*
168
+ //Configure the bookmark syncing switch to enable/disable syncing permissions.
163
169
164
170
this.bookmarkSyncCheck.setOnCheckedChangeListener { _, isChecked ->
165
171
this.viewModel.enableBookmarkSyncing(isChecked)
166
172
}
173
+ */
167
174
168
175
/*
169
176
* Hide the toolbar and back arrow if there is no page to return to (e.g. coming from a deep link).
@@ -294,8 +301,8 @@ class EKirjastoAccountFragment : Fragment(R.layout.account_ekirjasto){
294
301
buttonLoginPasskey.visibility = VISIBLE
295
302
buttonRegisterPasskey.visibility = GONE
296
303
}
297
- this .syncBookmarks.visibility = GONE
298
- this .bookmarkStatement.visibility = GONE
304
+ // this.syncBookmarks.visibility = GONE
305
+ // this.bookmarkStatement.visibility = GONE
299
306
this .eulaStatement.visibility = VISIBLE
300
307
}
301
308
@@ -336,7 +343,7 @@ class EKirjastoAccountFragment : Fragment(R.layout.account_ekirjasto){
336
343
buttonLoginPasskey.visibility = VISIBLE
337
344
buttonRegisterPasskey.visibility = GONE
338
345
}
339
- this .syncBookmarks.visibility = GONE
346
+ // this.syncBookmarks.visibility = GONE
340
347
341
348
}
342
349
@@ -348,9 +355,9 @@ class EKirjastoAccountFragment : Fragment(R.layout.account_ekirjasto){
348
355
buttonLoginPasskey.visibility = GONE
349
356
buttonRegisterPasskey.visibility = VISIBLE
350
357
}
351
- this .syncBookmarks.visibility = VISIBLE
352
- this .bookmarkStatement.visibility = VISIBLE
353
- this .bookmarkSyncProgress.visibility = INVISIBLE
358
+ // this.syncBookmarks.visibility = VISIBLE
359
+ // this.bookmarkStatement.visibility = VISIBLE
360
+ // this.bookmarkSyncProgress.visibility = INVISIBLE
354
361
this .eulaStatement.visibility = GONE
355
362
}
356
363
@@ -460,16 +467,16 @@ class EKirjastoAccountFragment : Fragment(R.layout.account_ekirjasto){
460
467
return android.os.Build .VERSION .SDK_INT >= 28
461
468
}
462
469
470
+ /*
471
+ Bookmark syncing is not currently supported in E-kirjasto
472
+
463
473
private fun reconfigureBookmarkSyncingSwitch(status: BookmarkSyncEnableStatus) {
464
- /*
465
- * Remove the checked-change listener, because setting `isChecked` will trigger the listener.
466
- */
474
+
475
+ // Remove the checked-change listener, because setting `isChecked` will trigger the listener.
467
476
468
477
this.bookmarkSyncCheck.setOnCheckedChangeListener(null)
469
478
470
- /*
471
- * Otherwise, the switch is doing something that interests us...
472
- */
479
+ //Otherwise, the switch is doing something that interests us...
473
480
474
481
val account = this.viewModel.account
475
482
return when (status) {
@@ -504,5 +511,6 @@ class EKirjastoAccountFragment : Fragment(R.layout.account_ekirjasto){
504
511
}
505
512
}
506
513
}
514
+ */
507
515
508
516
}
0 commit comments