Skip to content

Commit

Permalink
Remove deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
dhzdhd committed Jan 22, 2023
1 parent 9589bdb commit e3f954f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
2 changes: 1 addition & 1 deletion api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod templates;
use askama::Template;
use axum::{
extract::{Path, State},
http::{HeaderValue, StatusCode},
http::StatusCode,
response::{Html, IntoResponse},
routing::get,
Json, Router,
Expand Down
3 changes: 0 additions & 3 deletions lib/src/home/widgets/snippet_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ class _BottomBarDialogWidgetState
)
.toList(),
onReorder: (oldIndex, newIndex) async {
// ! Removed setState
await ref
.watch(snippetBarStateProvider.notifier)
.reorder(oldIndex, newIndex);
Expand Down Expand Up @@ -333,7 +332,6 @@ class _AddSnippetDialogWidgetState
),
));
} else {
// setState(() {
await ref
.watch(snippetBarStateProvider.notifier)
.edit(
Expand All @@ -346,7 +344,6 @@ class _AddSnippetDialogWidgetState
),
),
);
// });
}
Navigator.of(context).pop();
}
Expand Down
17 changes: 0 additions & 17 deletions lib/src/home/widgets/text_selection_controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,6 @@ class CustomTextSelectionControls extends TextSelectionControls {
ClipboardStatusNotifier? clipboardStatus,
Offset? lastSecondaryTapDownPosition,
) {
// ! Deprecate later
// final TextSelectionPoint startTextSelectionPoint = endpoints[0];
// final TextSelectionPoint endTextSelectionPoint =
// endpoints.length > 1 ? endpoints[1] : endpoints[0];
// final Offset anchorAbove = Offset(
// globalEditableRegion.left + selectionMidpoint.dx,
// globalEditableRegion.top +
// startTextSelectionPoint.point.dy -
// textLineHeight -
// _kToolbarContentDistance,
// );
// final Offset anchorBelow = Offset(
// globalEditableRegion.left + selectionMidpoint.dx,
// globalEditableRegion.top +
// endTextSelectionPoint.point.dy +
// _kToolbarContentDistanceBelow,
// );
return _TextSelectionControlsToolbar(
globalEditableRegion: globalEditableRegion,
textLineHeight: textLineHeight,
Expand Down

0 comments on commit e3f954f

Please sign in to comment.