mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-25 21:05:52 +08:00
tweaks (#1821)
* opt: _onTapUp * opt: set contains * opt: elementAtOrNull
This commit is contained in:
committed by
GitHub
parent
37fa165f59
commit
7260a387f9
@@ -1,5 +1,4 @@
|
||||
import 'package:PiliPlus/models/common/account_type.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
|
||||
class AccountTypeAdapter extends TypeAdapter<AccountType> {
|
||||
@@ -8,7 +7,7 @@ class AccountTypeAdapter extends TypeAdapter<AccountType> {
|
||||
|
||||
@override
|
||||
AccountType read(BinaryReader reader) =>
|
||||
AccountType.values.getOrNull(reader.readByte()) ?? AccountType.main;
|
||||
AccountType.values.elementAtOrNull(reader.readByte()) ?? AccountType.main;
|
||||
|
||||
@override
|
||||
void write(BinaryWriter writer, AccountType obj) {
|
||||
|
||||
Reference in New Issue
Block a user