Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed broken profile image upload [#701](https://github.com/parres-hq/whitenoise_flutter/pull/701)
- Fixed double rendering issue for some messages [#654](https://github.com/parres-hq/whitenoise_flutter/pull/654)
- Fixed message bubble jumping to another location on context screen.

- Fixed status bar icons invisibility in auth screens (iOS and Android).
- Fixed start chat button cut off (and other bottom sheets).

### Security

Expand Down
34 changes: 17 additions & 17 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -99,24 +99,24 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/workmanager_apple/ios"

SPEC CHECKSUMS:
audio_session: 19e9480dbdd4e5f6c4543826b2e8b0e4ab6145fe
emoji_picker_flutter: 8e50ec5caac456a23a78637e02c6293ea0ac8771
audio_session: 9bb7f6c970f21241b19f5a3658097ae459681ba0
emoji_picker_flutter: ece213fc274bdddefb77d502d33080dc54e616cc
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
flutter_local_notifications: df98d66e515e1ca797af436137b4459b160ad8c9
flutter_native_splash: df59bb2e1421aa0282cb2e95618af4dcb0c56c29
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
flutter_timezone: ac3da59ac941ff1c98a2e1f0293420e020120282
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
just_audio: a42c63806f16995daf5b219ae1d679deb76e6a79
mobile_scanner: 77265f3dc8d580810e91849d4a0811a90467ed5e
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
rust_lib_whitenoise: 69ef24b69b2aba78a7ebabc09a504b5a39177d21
share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
workmanager_apple: 7bac258335c310689a641e2d66e88d4845d372e9
flutter_local_notifications: 395056b3175ba4f08480a7c5de30cd36d69827e4
flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf
flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13
flutter_timezone: 7c838e17ffd4645d261e87037e5bebf6d38fe544
image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a
integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e
just_audio: 4e391f57b79cad2b0674030a00453ca5ce817eed
mobile_scanner: 9157936403f5a0644ca3779a38ff8404c5434a93
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
rust_lib_whitenoise: 22de658398f8e36a1a396d35b6b6547a0732e6bb
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
workmanager_apple: 904529ae31e97fc5be632cf628507652294a0778

PODFILE CHECKSUM: e30f02f9d1c72c47bb6344a0a748c9d268180865

Expand Down
3 changes: 1 addition & 2 deletions lib/ui/auth_flow/create_profile_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class _CreateProfileScreenState extends ConsumerState<CreateProfileScreen>
minLines: 3,
keyboardType: TextInputType.multiline,
),
Gap(32.h),
Gap(16.h),
],
),
),
Expand All @@ -233,7 +233,6 @@ class _CreateProfileScreenState extends ConsumerState<CreateProfileScreen>
padding: EdgeInsets.only(
left: 24.w,
right: 24.w,
top: 16.h,
bottom: 16.h + MediaQuery.of(context).viewInsets.bottom,
),
child: SafeArea(
Expand Down
3 changes: 1 addition & 2 deletions lib/ui/chat/chat_info/edit_group_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ class _EditGroupScreenState extends ConsumerState<EditGroupScreen> {
child: Scaffold(
backgroundColor: context.colors.appBarBackground,
body: SafeArea(
bottom: false,
child: ColoredBox(
color: context.colors.neutral,
child: Column(
Expand Down Expand Up @@ -253,7 +252,7 @@ class _EditGroupScreenState extends ConsumerState<EditGroupScreen> {
loading: _isLoading,
label: 'shared.save'.tr(),
),
Gap(36.h),
Gap(16.h),
],
),
),
Expand Down
16 changes: 8 additions & 8 deletions lib/ui/core/ui/wn_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ class WnBottomSheet {
return MediaQuery.of(context).viewInsets.bottom > 0;
}

/// Calculate bottom padding to reach exactly 24h or 54h total (including SafeArea)
static double _calculateBottomPadding(BuildContext context) {
final safeAreaBottom = MediaQuery.paddingOf(context).bottom;
final targetPadding = isKeyboardOpen(context) ? 24.h : 54.h;
final additionalPadding = targetPadding - safeAreaBottom;
/// Calculate bottom padding for safe area
/// - When keyboard is open: 8.h padding
/// - When keyboard is closed: device safe area (home indicator) + 8.h padding
static double _calculateSafeAreaPadding(BuildContext context) {
final keyboardHeight = MediaQuery.viewInsetsOf(context).bottom;
final safeAreaBottom = MediaQuery.viewPaddingOf(context).bottom;

// Ensure we don't have negative padding
return additionalPadding > 0 ? additionalPadding : 0;
return keyboardHeight > 0 ? 16.h : safeAreaBottom + 16.h;
}

static Future<T?> show<T>({
Expand Down Expand Up @@ -186,7 +186,7 @@ class WnBottomSheet {
padding: EdgeInsets.symmetric(horizontal: 16.w).copyWith(
bottom:
(keyboardAware ? MediaQuery.viewInsetsOf(context).bottom : 0) +
(useSafeArea ? _calculateBottomPadding(context) : 0),
(useSafeArea ? _calculateSafeAreaPadding(context) : 0),
top: 16.h,
),
child: Column(
Expand Down
1 change: 0 additions & 1 deletion lib/ui/settings/network/network_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ class _NetworkScreenState extends ConsumerState<NetworkScreen> {
),
),
body: SafeArea(
bottom: false,
child: ColoredBox(
color: context.colors.neutral,
child: Column(
Expand Down
5 changes: 2 additions & 3 deletions lib/ui/settings/profile/edit_profile_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ class _ProfileState extends ConsumerState<EditProfileScreen> {
),
),
body: SafeArea(
bottom: false,
child: ColoredBox(
color: context.colors.neutral,
child: profileState.when(
Expand All @@ -138,7 +137,7 @@ class _ProfileState extends ConsumerState<EditProfileScreen> {
children: [
Expanded(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 24.h),
padding: EdgeInsets.only(top: 24.h),
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
Expand Down Expand Up @@ -254,7 +253,7 @@ class _ProfileState extends ConsumerState<EditProfileScreen> {
padding: EdgeInsets.only(
left: 16.w,
right: 16.w,
bottom: MediaQuery.of(context).viewPadding.bottom,
bottom: 16.h,
),
child: profileState.when(
data:
Expand Down
1 change: 0 additions & 1 deletion lib/ui/settings/profile/switch_profile_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ class _SwitchProfileBottomSheetState extends ConsumerState<SwitchProfileBottomSh
label: 'ui.connectAnotherProfile'.tr(),
onPressed: _handleConnectAnotherProfile,
),
Gap(28.h),
],
],
),
Expand Down
1 change: 0 additions & 1 deletion lib/ui/user_profile_list/group_chat_details_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ class _GroupChatDetailsSheetState extends ConsumerState<GroupChatDetailsSheet> w
? 'ui.creatingGroup'.tr()
: 'ui.createGroup'.tr(),
),
Gap(16.h),
],
),
);
Expand Down
160 changes: 81 additions & 79 deletions lib/ui/user_profile_list/new_group_chat_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,94 +171,96 @@ class _NewGroupChatSheetState extends ConsumerState<NewGroupChatSheet> {
);
final filteredUserProfiles = _getFilteredUserProfiles(userProfiles.toList(), activeAccount);

return Padding(
padding: EdgeInsets.only(bottom: 16.h),
child: Column(
children: [
Row(
children: [
Expanded(
child: WnTextFormField(
controller: _searchController,
hintText: 'chats.searchUserPlaceholder'.tr(),
size: FieldSize.small,
decoration: InputDecoration(
prefixIcon: Padding(
padding: EdgeInsets.all(12.w),
child: WnImage(
AssetsPaths.icSearch,
color: context.colors.primary,
size: 16.w,
),
return Column(
children: [
Row(
children: [
Expanded(
child: WnTextFormField(
controller: _searchController,
hintText: 'chats.searchUserPlaceholder'.tr(),
size: FieldSize.small,
decoration: InputDecoration(
prefixIcon: Padding(
padding: EdgeInsets.all(12.w),
child: WnImage(
AssetsPaths.icSearch,
color: context.colors.primary,
size: 16.w,
),
),
),
),
Gap(4.w),
WnIconButton(
iconPath: AssetsPaths.icPaste,
onTap:
() async => await ClipboardUtils.pasteWithToast(
ref: ref,
onPaste: (text) {
_searchController.text = text;
},
),
padding: 14.w,
size: 44.h,
),
],
),
Expanded(
child:
followsState.isLoading
? const Center(child: CircularProgressIndicator())
: followsState.error != null
? Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'chats.followsLoadingError'.tr(),
style: TextStyle(fontSize: 16.sp),
),
Gap(8.h),
Text(
followsState.error!,
style: TextStyle(
fontSize: 12.sp,
color: context.colors.baseMuted,
),
textAlign: TextAlign.center,
),
Gap(16.h),
ElevatedButton(
onPressed: () {
Navigator.of(context).pop();
},
child: Text('shared.goBack'.tr()),
),
Gap(4.w),
WnIconButton(
iconPath: AssetsPaths.icPaste,
onTap:
() async => await ClipboardUtils.pasteWithToast(
ref: ref,
onPaste: (text) {
_searchController.text = text;
},
),
padding: 14.w,
size: 44.h,
),
],
),
Expanded(
child:
followsState.isLoading
? const Center(child: CircularProgressIndicator())
: followsState.error != null
? Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'chats.followsLoadingError'.tr(),
style: TextStyle(fontSize: 16.sp),
),
Gap(8.h),
Text(
followsState.error!,
style: TextStyle(
fontSize: 12.sp,
color: context.colors.baseMuted,
),
],
),
)
: _buildUserProfilesList(filteredUserProfiles),
),
WnFilledButton(
onPressed:
_selectedUserProfiles.isNotEmpty
? () {
Navigator.pop(context);
textAlign: TextAlign.center,
),
Gap(16.h),
ElevatedButton(
onPressed: () {
// Navigate back - contacts should be loaded by new_chat_bottom_sheet
Navigator.of(context).pop();
},
child: Text('shared.goBack'.tr()),
),
],
),
)
: _buildUserProfilesList(filteredUserProfiles),
),
WnFilledButton(
onPressed:
_selectedUserProfiles.isNotEmpty
? () {
final parentContext = Navigator.of(context).context;
Navigator.pop(context);
Future.delayed(const Duration(milliseconds: 300), () {
if (!parentContext.mounted) return;
GroupChatDetailsSheet.show(
context: context,
context: parentContext,
selectedUserProfiles: _selectedUserProfiles.toList(),
onGroupCreated: widget.onGroupCreated,
);
}
: null,
label: 'shared.continue'.tr(),
),
],
),
});
}
: null,
label: 'shared.continue'.tr(),
),
],
);
}
}