-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
[SYNC-CONTACT-V2] Update UI for new contact
Showing
15 changed files
with
178 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 30 additions & 13 deletions
43
lib/domain/app_state/contact/get_phonebook_contact_state_v2.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,55 @@ | ||
import 'package:fluffychat/app_state/failure.dart'; | ||
import 'package:fluffychat/app_state/initial.dart'; | ||
import 'package:fluffychat/app_state/success.dart'; | ||
import 'package:fluffychat/domain/model/contact/contact_v2.dart'; | ||
import 'package:fluffychat/domain/model/contact/contact_new.dart'; | ||
|
||
class GetPhonebookContactsInitial extends Initial { | ||
const GetPhonebookContactsInitial() : super(); | ||
class GetPhonebookContactsV2Initial extends Initial { | ||
const GetPhonebookContactsV2Initial() : super(); | ||
|
||
@override | ||
List<Object?> get props => []; | ||
} | ||
|
||
class GetPhonebookContactsLoading extends Success { | ||
class GetPhonebookContactsV2Loading extends Success { | ||
final int progress; | ||
|
||
const GetPhonebookContactsLoading({required this.progress}); | ||
const GetPhonebookContactsV2Loading({required this.progress}); | ||
|
||
@override | ||
List<Object?> get props => [progress]; | ||
} | ||
|
||
class GetPhonebookContactsSuccess extends Success { | ||
class GetPhonebookContactsV2Success extends Success { | ||
final int progress; | ||
final List<Contact> foundContacts; | ||
final List<Contact> notFoundContacts; | ||
final int totalProgress; | ||
final List<Contact> contacts; | ||
|
||
const GetPhonebookContactsSuccess({ | ||
const GetPhonebookContactsV2Success({ | ||
required this.progress, | ||
required this.foundContacts, | ||
required this.notFoundContacts, | ||
required this.totalProgress, | ||
required this.contacts, | ||
}); | ||
|
||
@override | ||
List<Object?> get props => [ | ||
progress, | ||
foundContacts, | ||
notFoundContacts, | ||
contacts, | ||
totalProgress, | ||
]; | ||
} | ||
|
||
class GetPhonebookContactsV2IsEmpty extends Failure { | ||
const GetPhonebookContactsV2IsEmpty(); | ||
|
||
@override | ||
List<Object?> get props => []; | ||
} | ||
|
||
class GetPhonebookContactsV2Failure extends Failure { | ||
final dynamic exception; | ||
|
||
const GetPhonebookContactsV2Failure({required this.exception}); | ||
|
||
@override | ||
List<Object?> get props => [exception]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.