diff --git a/lib/pangea/choreographer/controllers/choreographer.dart b/lib/pangea/choreographer/controllers/choreographer.dart index e9ac10683..aee560249 100644 --- a/lib/pangea/choreographer/controllers/choreographer.dart +++ b/lib/pangea/choreographer/controllers/choreographer.dart @@ -66,7 +66,7 @@ class Choreographer { InputPasteListener( _textController, // TODO, do something on paste - () {}, + () => debugPrint("on paste"), ); itController = ITController(this); igc = IgcController(this); diff --git a/lib/pangea/choreographer/utils/input_paste_listener.dart b/lib/pangea/choreographer/utils/input_paste_listener.dart index ba0746166..9195527a0 100644 --- a/lib/pangea/choreographer/utils/input_paste_listener.dart +++ b/lib/pangea/choreographer/utils/input_paste_listener.dart @@ -17,7 +17,7 @@ class InputPasteListener { if (controller.editType != EditType.keyboard) return; final difference = controller.text.characters.length - _currentText.characters.length; - if (difference.abs() > 1) onPaste(); + if (difference > 1) onPaste(); _currentText = controller.text; }); }