Skip to content

Commit

Permalink
TW-1356: change action for profile tap
Browse files Browse the repository at this point in the history
  • Loading branch information
sherlockvn authored and hoangdat committed May 31, 2024
1 parent a47674e commit 52a4c38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
11 changes: 1 addition & 10 deletions lib/pages/chat_list/chat_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import 'package:fluffychat/di/global/get_it_initializer.dart';
import 'package:fluffychat/domain/model/recovery_words/recovery_words.dart';
import 'package:fluffychat/domain/model/room/room_extension.dart';
import 'package:fluffychat/domain/usecase/recovery/get_recovery_words_interactor.dart';
import 'package:fluffychat/pages/multiple_accounts/multiple_accounts_picker.dart';
import 'package:fluffychat/presentation/mixins/comparable_presentation_contact_mixin.dart';
import 'package:fluffychat/pages/bootstrap/bootstrap_dialog.dart';
import 'package:fluffychat/pages/bootstrap/tom_bootstrap_dialog.dart';
Expand Down Expand Up @@ -760,16 +759,8 @@ class ChatListController extends State<ChatList>
currentProfileNotifier.value = profile;
}

void onGoToAccountSettings() {
widget.onOpenSettings?.call();
}

void onClickAvatar() {
MultipleAccountsPickerController(context: context)
.showMultipleAccountsPicker(
activeClient,
onGoToAccountSettings: onGoToAccountSettings,
);
context.push('/rooms/profile');
}

void _handleRecovery() {
Expand Down
9 changes: 3 additions & 6 deletions lib/pages/multiple_accounts/multiple_accounts_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ import 'package:fluffychat/pages/twake_welcome/twake_welcome.dart';
import 'package:fluffychat/presentation/extensions/multiple_accounts/client_profile_extension.dart';
import 'package:fluffychat/presentation/multiple_account/client_profile_presentation.dart';
import 'package:fluffychat/presentation/multiple_account/twake_chat_presentation_account.dart';
import 'package:fluffychat/resource/image_paths.dart';
import 'package:fluffychat/widgets/layouts/agruments/switch_active_account_body_args.dart';
import 'package:fluffychat/widgets/matrix.dart';
import 'package:fluffychat/widgets/twake_components/twake_header_style.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:go_router/go_router.dart';
import 'package:linagora_design_flutter/linagora_design_flutter.dart';
import 'package:linagora_design_flutter/multiple_account/models/twake_presentation_account.dart';
Expand Down Expand Up @@ -82,10 +80,9 @@ class MultipleAccountsPickerController {
titleAccountSettings: L10n.of(context)!.accountSettings,
logoApp: Padding(
padding: TwakeHeaderStyle.logoAppOfMultiplePadding,
child: SvgPicture.asset(
ImagePaths.icTwakeImageLogo,
width: TwakeHeaderStyle.logoAppOfMultipleWidth,
height: TwakeHeaderStyle.logoAppOfMultipleHeight,
child: Text(
L10n.of(context)!.selectAccount,
style: TwakeHeaderStyle.selectAccountTextStyle(context),
),
),
accountNameStyle: Theme.of(context).textTheme.bodyLarge!.copyWith(
Expand Down

0 comments on commit 52a4c38

Please sign in to comment.