diff --git a/lib/model/push_request_queue.dart b/lib/model/push_request_queue.dart index 61c1ad961..95e92452f 100644 --- a/lib/model/push_request_queue.dart +++ b/lib/model/push_request_queue.dart @@ -51,8 +51,6 @@ class PushRequestQueue { PushRequest? peek() => list.isNotEmpty ? list.first : null; - PushRequest pop() => list.removeAt(0); - PushRequest? tryPop() => list.isNotEmpty ? list.removeAt(0) : null; @override diff --git a/lib/views/settings_view/settings_view.dart b/lib/views/settings_view/settings_view.dart index 0a27d6153..b39d26dc7 100644 --- a/lib/views/settings_view/settings_view.dart +++ b/lib/views/settings_view/settings_view.dart @@ -220,27 +220,6 @@ class SettingsView extends ConsumerWidget { onChanged: (value) => ref.read(settingsProvider.notifier).setPolling(value), ), ), - // if (ref.watch(tokenProvider).hasHOTPTokens) - // ListTile( - // title: RichText( - // text: TextSpan( - // children: [ - // TextSpan( - // text: AppLocalizations.of(context)!.hidePushTokens, - // style: Theme.of(context).textTheme.titleMedium, - // ), - // ], - // ), - // ), - // subtitle: Text( - // AppLocalizations.of(context)!.hidePushTokensDescription, - // overflow: TextOverflow.fade, - // ), - // trailing: Switch( - // value: ref.watch(settingsProvider).hidePushTokensState != HidePushTokens.notHidden, - // onChanged: (value) => ref.read(settingsProvider.notifier).setHidePushTokens(isHidden: value), - // ), - // ) ], ), ), diff --git a/test/unit_test/utils/push_request_queue_test.dart b/test/unit_test/utils/push_request_queue_test.dart index 23a2dd4d2..50c1090c5 100644 --- a/test/unit_test/utils/push_request_queue_test.dart +++ b/test/unit_test/utils/push_request_queue_test.dart @@ -61,8 +61,8 @@ void verifyCustomListBehavesLikeQueue() { expect(fifo.isNotEmpty, true); expect(fifo.isEmpty, false); - var pop = fifo.pop(); - expect(pop, pushRequest); + var tryPop = fifo.tryPop(); + expect(tryPop, pushRequest); expect(fifo.isNotEmpty, false); expect(fifo.isEmpty, true); @@ -126,7 +126,7 @@ void verifyCustomListBehavesLikeQueue() { fifo.add(three); expect(fifo.peek(), queue.first); - fifo.pop(); + fifo.tryPop(); queue.removeFirst(); expect(fifo.peek(), queue.first); @@ -134,10 +134,10 @@ void verifyCustomListBehavesLikeQueue() { fifo.add(four); queue.addLast(five); fifo.add(five); - expect(fifo.pop(), queue.removeFirst()); - expect(fifo.pop(), queue.removeFirst()); - expect(fifo.pop(), queue.removeFirst()); - expect(fifo.pop(), queue.removeFirst()); + expect(fifo.tryPop(), queue.removeFirst()); + expect(fifo.tryPop(), queue.removeFirst()); + expect(fifo.tryPop(), queue.removeFirst()); + expect(fifo.tryPop(), queue.removeFirst()); expect(fifo.isEmpty, true); expect(queue.isEmpty, true);