Skip to content

Commit

Permalink
fix the trailing comma
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainaamr committed Jan 28, 2024
1 parent 84b7b9e commit b31e808
Show file tree
Hide file tree
Showing 9 changed files with 1,289 additions and 689 deletions.
1,796 changes: 1,192 additions & 604 deletions lib/base/networking/api/gocast/api_v2.pb.dart

Large diffs are not rendered by default.

143 changes: 78 additions & 65 deletions lib/base/networking/api/gocast/api_v2.pbjson.dart

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions lib/base/networking/api/handler/chat_handler.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import 'dart:async';

import 'package:fixnum/fixnum.dart';
import 'package:gocast_mobile/base/networking/api/gocast/api_v2.pb.dart';
import 'package:gocast_mobile/base/networking/api/handler/grpc_handler.dart';
import 'package:logger/logger.dart';
Expand Down Expand Up @@ -39,8 +37,9 @@ class ChatHandlers {
);
}

Future<ChatReaction> postMessageReaction(
int messageID, int streamID, String emoji) async {
Future<ChatReaction> postMessageReaction(int messageID,
int streamID,
String emoji,) async {
_logger.i('Posting chat reaction');
return _grpcHandler.callGrpcMethod(
(client) async {
Expand All @@ -57,8 +56,9 @@ class ChatHandlers {
);
}

Future<void> deleteMessageReaction(
int messageID, int streamID, int reactionID) async {
Future<void> deleteMessageReaction(int messageID,
int streamID,
int reactionID,) async {
_logger.i('Deleting chat reaction');
return _grpcHandler.callGrpcMethod(
(client) async {
Expand All @@ -74,8 +74,9 @@ class ChatHandlers {
);
}

Future<ChatMessage> postChatReply(
int messageID, int streamID, String message) async {
Future<ChatMessage> postChatReply(int messageID,
int streamID,
String message,) async {
_logger.i('Posting chat reply');
return _grpcHandler.callGrpcMethod(
(client) async {
Expand Down
11 changes: 8 additions & 3 deletions lib/base/networking/api/handler/poll_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,18 @@ class PollHandlers {

Future<void> postPollVote(int streamID, int pollOptionID) async {
_logger.i(
'Posting poll vote for streamID: $streamID, pollOptionID: $pollOptionID');
'Posting poll vote for streamID: $streamID, pollOptionID: $pollOptionID',
);
return _grpcHandler.callGrpcMethod(
(client) async {
await client.postPollVote(PostPollVoteRequest(
streamID: streamID, pollOptionID: pollOptionID));
streamID: streamID,
pollOptionID: pollOptionID,
),
);
_logger.i(
'Poll vote posted successfully for option $pollOptionID in stream $streamID');
'Poll vote posted successfully for option $pollOptionID in stream $streamID',
);
// Assuming PostPollVoteResponse doesn't have a field to return, just logging the success
},
);
Expand Down
1 change: 0 additions & 1 deletion lib/views/chat_view/chat_view.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

import 'package:fixnum/fixnum.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:gocast_mobile/views/chat_view/chat_view_state.dart';

Expand Down
4 changes: 0 additions & 4 deletions lib/views/chat_view/chat_view_state.dart
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import 'dart:async';

import 'package:fixnum/fixnum.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:gocast_mobile/models/chat/chat_state_model.dart';
import 'package:gocast_mobile/providers.dart';
import 'package:gocast_mobile/views/chat_view/chat_view.dart';
import 'package:gocast_mobile/views/chat_view/suggested_streams_list.dart';
import 'package:gocast_mobile/base/networking/api/gocast/api_v2.pb.dart';
import 'package:gocast_mobile/views/video_view/video_player.dart';
import 'package:logger/logger.dart';

class ChatViewState extends ConsumerState<ChatView> {
Expand Down
4 changes: 2 additions & 2 deletions lib/views/chat_view/inactive_view.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:fixnum/fixnum.dart';
import 'package:gocast_mobile/providers.dart';
import 'package:gocast_mobile/views/chat_view/suggested_streams_list.dart';
import 'package:gocast_mobile/views/video_view/video_player.dart';
Expand Down Expand Up @@ -81,7 +80,8 @@ class InactiveViewState extends ConsumerState<InactiveView> {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => VideoPlayerPage(stream: stream)),
builder: (context) => VideoPlayerPage(stream: stream),
),
);
},
),
Expand Down
1 change: 0 additions & 1 deletion lib/views/chat_view/poll_view.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:fixnum/fixnum.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

import 'package:gocast_mobile/views/chat_view/poll_view_state.dart';
Expand Down
1 change: 0 additions & 1 deletion lib/views/chat_view/poll_view_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ class PollViewState extends ConsumerState<PollView> {
Widget _buildActivePollOption(
BuildContext context, Poll poll, PollOption option,) {
bool isSelected = selectedOptions[poll.id] == option.id;
ThemeData themeData = Theme.of(context);
return GestureDetector(
onTap: () {
setState(() {
Expand Down

0 comments on commit b31e808

Please sign in to comment.