refactor(llc, core, ui): Deprecate .user, .userStream in favor of .currentUser, .currentUserStream
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -103,7 +103,7 @@ class ChannelListPage extends StatelessWidget {
|
||||
: null,
|
||||
filter: Filter.in_(
|
||||
'members',
|
||||
[StreamChat.of(context).user!.id],
|
||||
[StreamChat.of(context).currentUser!.id],
|
||||
),
|
||||
sort: const [SortOption('last_message_at')],
|
||||
pagination: const PaginationParams(
|
||||
|
||||
@@ -80,7 +80,7 @@ class ChannelListPage extends StatelessWidget {
|
||||
child: ChannelListView(
|
||||
filter: Filter.in_(
|
||||
'members',
|
||||
[StreamChat.of(context).user!.id],
|
||||
[StreamChat.of(context).currentUser!.id],
|
||||
),
|
||||
sort: const [SortOption('last_message_at')],
|
||||
pagination: const PaginationParams(
|
||||
|
||||
@@ -81,7 +81,7 @@ class ChannelListPage extends StatelessWidget {
|
||||
child: ChannelListView(
|
||||
filter: Filter.in_(
|
||||
'members',
|
||||
[StreamChat.of(context).user!.id],
|
||||
[StreamChat.of(context).currentUser!.id],
|
||||
),
|
||||
channelPreviewBuilder: _channelPreviewBuilder,
|
||||
// sort: [SortOption('last_message_at')],
|
||||
|
||||
@@ -66,7 +66,7 @@ class ChannelListPage extends StatelessWidget {
|
||||
child: ChannelListView(
|
||||
filter: Filter.in_(
|
||||
'members',
|
||||
[StreamChat.of(context).user!.id],
|
||||
[StreamChat.of(context).currentUser!.id],
|
||||
),
|
||||
sort: const [SortOption('last_message_at')],
|
||||
pagination: const PaginationParams(
|
||||
|
||||
@@ -72,7 +72,7 @@ class ChannelListPage extends StatelessWidget {
|
||||
child: ChannelListView(
|
||||
filter: Filter.in_(
|
||||
'members',
|
||||
[StreamChat.of(context).user!.id],
|
||||
[StreamChat.of(context).currentUser!.id],
|
||||
),
|
||||
sort: const [SortOption('last_message_at')],
|
||||
pagination: const PaginationParams(
|
||||
@@ -115,7 +115,8 @@ class ChannelPage extends StatelessWidget {
|
||||
MessageWidget _,
|
||||
) {
|
||||
final message = details.message;
|
||||
final isCurrentUser = StreamChat.of(context).user!.id == message.user!.id;
|
||||
final isCurrentUser =
|
||||
StreamChat.of(context).currentUser!.id == message.user!.id;
|
||||
final textAlign = isCurrentUser ? TextAlign.right : TextAlign.left;
|
||||
final color = isCurrentUser ? Colors.blueGrey : Colors.blue;
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ class ChannelListPage extends StatelessWidget {
|
||||
child: ChannelListView(
|
||||
filter: Filter.in_(
|
||||
'members',
|
||||
[StreamChat.of(context).user!.id],
|
||||
[StreamChat.of(context).currentUser!.id],
|
||||
),
|
||||
sort: const [SortOption('last_message_at')],
|
||||
pagination: const PaginationParams(
|
||||
|
||||
Reference in New Issue
Block a user