Revert "refactor: Avoid unnecessary bool comparison"
This reverts commit 1cd3a91037.
This commit is contained in:
parent
84993dec59
commit
a9a8b39465
14 changed files with 24 additions and 22 deletions
|
|
@ -168,8 +168,9 @@ class ChatListController extends State<ChatList>
|
|||
initialText: searchServer,
|
||||
keyboardType: TextInputType.url,
|
||||
autocorrect: false,
|
||||
validator: (server) =>
|
||||
server.contains('.') ? null : L10n.of(context).invalidServerName,
|
||||
validator: (server) => server.contains('.') == true
|
||||
? null
|
||||
: L10n.of(context).invalidServerName,
|
||||
);
|
||||
if (newServer == null) return;
|
||||
Matrix.of(context).store.setString(_serverStoreNamespace, newServer);
|
||||
|
|
@ -202,9 +203,10 @@ class ChatListController extends State<ChatList>
|
|||
|
||||
if (searchQuery.isValidMatrixId &&
|
||||
searchQuery.sigil == '#' &&
|
||||
!roomSearchResult.chunk.any(
|
||||
(room) => room.canonicalAlias == searchQuery,
|
||||
)) {
|
||||
roomSearchResult.chunk.any(
|
||||
(room) => room.canonicalAlias == searchQuery,
|
||||
) ==
|
||||
false) {
|
||||
final response = await client.getRoomIdByAlias(searchQuery);
|
||||
final roomId = response.roomId;
|
||||
if (roomId != null) {
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ extension on CachedPresence {
|
|||
? DateTime.now()
|
||||
: DateTime.fromMillisecondsSinceEpoch(0));
|
||||
|
||||
LinearGradient get gradient => presence.isOnline
|
||||
LinearGradient get gradient => presence.isOnline == true
|
||||
? LinearGradient(
|
||||
colors: [Colors.green, Colors.green.shade200, Colors.green.shade900],
|
||||
begin: Alignment.topLeft,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue