Merge pull request #415 from twonlyapp/dev
Some checks failed
Publish on Github / build_and_publish (push) Has been cancelled

- New: Adds an "Ask a Friend" button to new contact suggestions.
- New: Adds security profiles.
- Improved: Onboarding flow for new users.
- Improved: Flame restore experience.
- Improved: The blue verification checkmark now displays the total number of verifications.
- Fix: Issue with receiving messages when user closed app while decrypting
- Fix: Background message fetching reliability.
- Fix: Issue with focus changing when taking a picture
- Fix: Issues with the camera initialization
This commit is contained in:
Tobi 2026-05-22 13:52:52 +02:00 committed by GitHub
commit 25c826bff3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 63 additions and 37 deletions

View file

@ -21,13 +21,18 @@ class ContextMenu extends StatefulWidget {
class _ContextMenuState extends State<ContextMenu> { class _ContextMenuState extends State<ContextMenu> {
Offset? _tapPosition; Offset? _tapPosition;
Widget _getIcon(IconData icon) { Widget _getIcon(dynamic icon) {
return Padding( return Padding(
padding: const EdgeInsets.only(left: 12), padding: const EdgeInsets.only(left: 12),
child: FaIcon( child: icon is IconData
icon, ? Icon(
size: 20, icon,
), size: 20,
)
: FaIcon(
icon as FaIconData?,
size: 20,
),
); );
} }
@ -95,5 +100,5 @@ class ContextMenuItem {
}); });
final String title; final String title;
final Future<void> Function() onTap; final Future<void> Function() onTap;
final IconData icon; final dynamic icon;
} }

View file

@ -15,7 +15,7 @@ class BetterListTile extends StatelessWidget {
this.iconSize = 20, this.iconSize = 20,
this.padding, this.padding,
}); });
final IconData? icon; final dynamic icon;
final Widget? leading; final Widget? leading;
final Widget? trailing; final Widget? trailing;
final String? text; final String? text;
@ -34,11 +34,17 @@ class BetterListTile extends StatelessWidget {
child: Center( child: Center(
child: (leading != null) child: (leading != null)
? leading ? leading
: FaIcon( : (icon is IconData)
icon, ? Icon(
size: iconSize, icon as IconData,
color: color, size: iconSize,
), color: color,
)
: FaIcon(
icon as FaIconData?,
size: iconSize,
color: color,
),
), ),
), ),
trailing: trailing, trailing: trailing,

View file

@ -11,29 +11,44 @@ class ActionButton extends StatelessWidget {
this.disable = false, this.disable = false,
}); });
final VoidCallback? onPressed; final VoidCallback? onPressed;
final IconData? icon; final dynamic icon;
final Color? color; final Color? color;
final String tooltipText; final String tooltipText;
final bool disable; final bool disable;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final isFaIcon = icon is FaIconData;
return Tooltip( return Tooltip(
message: tooltipText, message: tooltipText,
child: IconButton( child: IconButton(
icon: FaIcon( icon: isFaIcon
icon, ? FaIcon(
size: (icon is FontAwesomeIcons) ? 25 : 30, icon as FaIconData?,
color: disable size: 25,
? const Color.fromARGB(154, 255, 255, 255) color: disable
: color ?? Colors.white, ? const Color.fromARGB(154, 255, 255, 255)
shadows: const [ : color ?? Colors.white,
Shadow( shadows: const [
color: Color.fromARGB(122, 0, 0, 0), Shadow(
blurRadius: 5, color: Color.fromARGB(122, 0, 0, 0),
), blurRadius: 5,
], ),
), ],
)
: Icon(
icon as IconData?,
size: 30,
color: disable
? const Color.fromARGB(154, 255, 255, 255)
: color ?? Colors.white,
shadows: const [
Shadow(
color: Color.fromARGB(122, 0, 0, 0),
blurRadius: 5,
),
],
),
onPressed: () { onPressed: () {
if (!disable && onPressed != null) onPressed!(); if (!disable && onPressed != null) onPressed!();
}, },

View file

@ -47,7 +47,7 @@ class _ChatGroupActionState extends State<ChatGroupAction> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var text = ''; var text = '';
IconData? icon; FaIconData? icon;
final affected = (affectedContact == null) final affected = (affectedContact == null)
? context.lang.groupActionYou ? context.lang.groupActionYou

View file

@ -71,7 +71,7 @@ class _MutualGroupsExpansionTileCompState
child: SizedBox( child: SizedBox(
width: 20, width: 20,
height: 20, height: 20,
child: Icon( child: FaIcon(
FontAwesomeIcons.userGroup, FontAwesomeIcons.userGroup,
size: 16, size: 16,
color: context.color.onSurfaceVariant, color: context.color.onSurfaceVariant,

View file

@ -128,7 +128,7 @@ class _VerificationExpansionTileCompState
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
constraints: const BoxConstraints(), constraints: const BoxConstraints(),
iconSize: 8, iconSize: 8,
icon: Icon( icon: FaIcon(
FontAwesomeIcons.trash, FontAwesomeIcons.trash,
size: 8, size: 8,
color: context.color.onSurfaceVariant, color: context.color.onSurfaceVariant,

View file

@ -97,7 +97,7 @@ class AddNewContactsPage extends StatelessWidget {
Widget _buildMethodItem( Widget _buildMethodItem(
BuildContext context, { BuildContext context, {
required IconData icon, required FaIconData icon,
required String text, required String text,
}) { }) {
return Padding( return Padding(

View file

@ -162,7 +162,7 @@ class _ModifyAvatarViewState extends State<ModifyAvatarView> {
_avatarMakerController.randomizedSelectedOptions, _avatarMakerController.randomizedSelectedOptions,
), ),
IconButton( IconButton(
icon: const Icon(FontAwesomeIcons.rotateLeft), icon: const FaIcon(FontAwesomeIcons.rotateLeft),
onLongPress: () async { onLongPress: () async {
await PersistentAvatarMakerController.clearAvatarMaker(); await PersistentAvatarMakerController.clearAvatarMaker();
await _avatarMakerController.restoreState(); await _avatarMakerController.restoreState();

View file

@ -375,7 +375,7 @@ class _MissionRow extends StatelessWidget {
required this.desc, required this.desc,
}); });
final IconData icon; final FaIconData icon;
final String title; final String title;
final String desc; final String desc;

View file

@ -22,7 +22,7 @@ class SelectedContactView {
}); });
final String title; final String title;
final String Function(int selected, int? limit) submitButton; final String Function(int selected, int? limit) submitButton;
final IconData submitIcon; final FaIconData submitIcon;
} }
class SelectContactsView extends StatefulWidget { class SelectContactsView extends StatefulWidget {

View file

@ -38,7 +38,7 @@ class _UnlockTwonlyViewState extends State<UnlockTwonlyView> {
children: [ children: [
const Spacer(), const Spacer(),
const Icon( const FaIcon(
FontAwesomeIcons.lock, FontAwesomeIcons.lock,
size: 40, size: 40,
), ),

View file

@ -868,10 +868,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: font_awesome_flutter name: font_awesome_flutter
sha256: b9011df3a1fa02993630b8fb83526368cf2206a711259830325bab2f1d2a4eb0 sha256: "09dcde8ab90ffae1a7d65ff2ef96fc62a17ad9d0ce7c127b317ded676b0d5935"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "10.12.0" version: "11.0.0"
fuchsia_remote_debug_protocol: fuchsia_remote_debug_protocol:
dependency: transitive dependency: transitive
description: flutter description: flutter

View file

@ -45,7 +45,7 @@ dependencies:
# Trusted publisher fluttercommunity.dev # Trusted publisher fluttercommunity.dev
connectivity_plus: ^7.0.0 connectivity_plus: ^7.0.0
device_info_plus: ^12.1.0 device_info_plus: ^12.1.0
font_awesome_flutter: ^10.10.0 font_awesome_flutter: ^11.0.0
share_plus: ^12.0.0 share_plus: ^12.0.0
package_info_plus: ^9.0.0 package_info_plus: ^9.0.0
workmanager: ^0.9.0+3 workmanager: ^0.9.0+3