chore: Make login with matrix id more prominent again

pull/1635/head
krille-chan 2 weeks ago
parent 1ca7fc971e
commit 31b4368f09
No known key found for this signature in database

@ -218,8 +218,8 @@ class HomeserverPickerController extends State<HomeserverPicker> {
void onMoreAction(MoreLoginActions action) { void onMoreAction(MoreLoginActions action) {
switch (action) { switch (action) {
case MoreLoginActions.passwordLogin: case MoreLoginActions.importBackup:
checkHomeserverAction(legacyPasswordLogin: true); restoreBackup();
case MoreLoginActions.privacy: case MoreLoginActions.privacy:
launchUrlString(AppConfig.privacyUrl); launchUrlString(AppConfig.privacyUrl);
case MoreLoginActions.about: case MoreLoginActions.about:
@ -228,7 +228,7 @@ class HomeserverPickerController extends State<HomeserverPicker> {
} }
} }
enum MoreLoginActions { passwordLogin, privacy, about } enum MoreLoginActions { importBackup, privacy, about }
class IdentityProvider { class IdentityProvider {
final String? id; final String? id;

@ -38,11 +38,11 @@ class HomeserverPickerView extends StatelessWidget {
onSelected: controller.onMoreAction, onSelected: controller.onMoreAction,
itemBuilder: (_) => [ itemBuilder: (_) => [
PopupMenuItem( PopupMenuItem(
value: MoreLoginActions.passwordLogin, value: MoreLoginActions.importBackup,
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
const Icon(Icons.login_outlined), const Icon(Icons.import_export_outlined),
const SizedBox(width: 12), const SizedBox(width: 12),
Text(L10n.of(context).loginWithMatrixId), Text(L10n.of(context).loginWithMatrixId),
], ],
@ -212,8 +212,10 @@ class HomeserverPickerView extends StatelessWidget {
), ),
onPressed: controller.isLoading onPressed: controller.isLoading
? null ? null
: controller.restoreBackup, : () => controller.checkHomeserverAction(
child: Text(L10n.of(context).hydrate), legacyPasswordLogin: true,
),
child: Text(L10n.of(context).loginWithMatrixId),
), ),
], ],
), ),

Loading…
Cancel
Save