fix(persistence,llc,core,ui): deprecated sort, add channelStateSort s… (#1366)

* fix(persistence,llc,core,ui): deprecated sort, add channelStateSort sorting the channels offline using the state

* update changelogs

* update tests

* remove deprecated test

* change threashold

* minor fixes

* remove tests

* fix(persistence): minor changes.

Signed-off-by: xsahil03x <[email protected]>

Signed-off-by: xsahil03x <[email protected]>
Co-authored-by: Sahil Kumar <[email protected]>
This commit is contained in:
Salvatore Giordano
2022-10-25 17:07:02 +02:00
committed by GitHub
co-authored by Sahil Kumar
parent 5784c53e6b
commit d09d3817b5
19 changed files with 131 additions and 55 deletions
@@ -618,7 +618,7 @@ void main() {
when(() => persistence.getChannelStates(
filter: any(named: 'filter'),
sort: any(named: 'sort'),
channelStateSort: any(named: 'channelStateSort'),
paginationParams: any(named: 'paginationParams'),
)).thenAnswer((_) async => persistentChannelStates);
@@ -674,7 +674,7 @@ void main() {
verify(() => persistence.getChannelStates(
filter: any(named: 'filter'),
sort: any(named: 'sort'),
channelStateSort: any(named: 'channelStateSort'),
paginationParams: any(named: 'paginationParams'),
)).called(1);
@@ -715,7 +715,7 @@ void main() {
when(() => persistence.getChannelStates(
filter: any(named: 'filter'),
sort: any(named: 'sort'),
channelStateSort: any(named: 'channelStateSort'),
paginationParams: any(named: 'paginationParams'),
)).thenAnswer((_) async => persistentChannelStates);
@@ -757,7 +757,7 @@ void main() {
verify(() => persistence.getChannelStates(
filter: any(named: 'filter'),
sort: any(named: 'sort'),
channelStateSort: any(named: 'channelStateSort'),
paginationParams: any(named: 'paginationParams'),
)).called(1);
@@ -56,7 +56,10 @@ class TestPersistenceClient extends ChatPersistenceClient {
@override
Future<List<ChannelState>> getChannelStates(
{Filter? filter,
List<SortOption<ChannelModel>>? sort,
@Deprecated('''
sort has been deprecated.
Please use channelStateSort instead.''') List<SortOption<ChannelModel>>? sort,
List<SortOption<ChannelState>>? channelStateSort,
PaginationParams? paginationParams}) =>
throw UnimplementedError();