CW-273-Don't-add-node-under-Advanced-Privacy-Settings-if-it-already-exists (#876)

* don't add existing node

* minor fixes

* Add back IsExecutingState to connect [skip ci]

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
Serhii 2023-04-14 21:55:12 +03:00 committed by GitHub
parent 375755919a
commit 3b69aa8686
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 58 additions and 21 deletions

View file

@ -73,6 +73,25 @@ class Node extends HiveObject with Keyable {
}
}
@override
bool operator ==(other) =>
other is Node &&
(other.uriRaw == uriRaw &&
other.login == login &&
other.password == password &&
other.typeRaw == typeRaw &&
other.useSSL == useSSL &&
other.trusted == trusted);
@override
int get hashCode =>
uriRaw.hashCode ^
login.hashCode ^
password.hashCode ^
typeRaw.hashCode ^
useSSL.hashCode ^
trusted.hashCode;
@override
dynamic get keyIndex {
_keyIndex ??= key;