mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 05:05:10 +00:00
chore: Remove vibration on iOS for long press
This commit is contained in:
parent
01b723bd05
commit
e0ecdee5d5
1 changed files with 9 additions and 5 deletions
|
@ -7,6 +7,7 @@ import 'package:vibration/vibration.dart';
|
||||||
|
|
||||||
import 'package:fluffychat/config/themes.dart';
|
import 'package:fluffychat/config/themes.dart';
|
||||||
import 'package:fluffychat/utils/date_time_extension.dart';
|
import 'package:fluffychat/utils/date_time_extension.dart';
|
||||||
|
import 'package:fluffychat/utils/platform_infos.dart';
|
||||||
import 'package:fluffychat/utils/string_color.dart';
|
import 'package:fluffychat/utils/string_color.dart';
|
||||||
import 'package:fluffychat/widgets/avatar.dart';
|
import 'package:fluffychat/widgets/avatar.dart';
|
||||||
import 'package:fluffychat/widgets/hover_builder.dart';
|
import 'package:fluffychat/widgets/hover_builder.dart';
|
||||||
|
@ -220,11 +221,14 @@ class Message extends StatelessWidget {
|
||||||
? null
|
? null
|
||||||
: () {
|
: () {
|
||||||
onSelect(event);
|
onSelect(event);
|
||||||
Vibration.hasVibrator().then((has) {
|
// Android usually has a vibration effect on long press:
|
||||||
if (has == true) {
|
if (PlatformInfos.isAndroid) {
|
||||||
Vibration.vibrate(duration: 50);
|
Vibration.hasVibrator().then((has) {
|
||||||
}
|
if (has == true) {
|
||||||
});
|
Vibration.vibrate(duration: 50);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: AnimatedOpacity(
|
child: AnimatedOpacity(
|
||||||
opacity: animateIn
|
opacity: animateIn
|
||||||
|
|
Loading…
Reference in a new issue