Skip to content

Commit

Permalink
Updated documentation and fixed imports
Browse files Browse the repository at this point in the history
  • Loading branch information
pratham-sarankar committed Nov 14, 2024
1 parent 7775a54 commit 0a9b75a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions lib/ui/page/home/page/chat/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import 'package:get/get.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
import 'package:super_drag_and_drop/super_drag_and_drop.dart';

import '/util/data_reader.dart';
import '/api/backend/schema.dart'
hide
ChatItemQuoteInput,
Expand All @@ -40,13 +39,13 @@ import '/api/backend/schema.dart'
ChatMessageRepliesInput;
import '/domain/model/application_settings.dart';
import '/domain/model/attachment.dart';
import '/domain/model/chat.dart';
import '/domain/model/chat_call.dart';
import '/domain/model/chat_info.dart';
import '/domain/model/chat_item.dart';
import '/domain/model/chat_item_quote.dart';
import '/domain/model/chat_item_quote_input.dart';
import '/domain/model/chat_message_input.dart';
import '/domain/model/chat.dart';
import '/domain/model/contact.dart';
import '/domain/model/mute_duration.dart';
import '/domain/model/precise_date_time/precise_date_time.dart';
Expand Down Expand Up @@ -93,6 +92,7 @@ import '/ui/page/home/page/user/controller.dart';
import '/ui/widget/text_field.dart';
import '/ui/worker/cache.dart';
import '/util/audio_utils.dart';
import '/util/data_reader.dart';
import '/util/log.dart';
import '/util/message_popup.dart';
import '/util/obs/obs.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/page/home/page/chat/forward/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import 'package:flutter/widgets.dart';
import 'package:get/get.dart';
import 'package:super_drag_and_drop/super_drag_and_drop.dart';

import '/util/data_reader.dart';
import '/api/backend/schema.dart' show ForwardChatItemsErrorCode;
import '/domain/model/attachment.dart';
import '/domain/model/chat.dart';
Expand All @@ -38,6 +37,7 @@ import '/l10n/l10n.dart';
import '/provider/gql/exceptions.dart';
import '/ui/page/call/search/controller.dart';
import '/ui/page/home/page/chat/message_field/controller.dart';
import '/util/data_reader.dart';
import '/util/message_popup.dart';

export 'view.dart';
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/page/home/page/chat/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import 'package:get/get.dart';

import '/domain/model/application_settings.dart';
import '/domain/model/attachment.dart';
import '/domain/model/chat_item_quote_input.dart';
import '/domain/model/chat_item.dart';
import '/domain/model/chat.dart';
import '/domain/model/chat_item.dart';
import '/domain/model/chat_item_quote_input.dart';
import '/domain/model/precise_date_time/precise_date_time.dart';
import '/domain/model/user.dart';
import '/domain/repository/paginated.dart';
Expand Down
12 changes: 6 additions & 6 deletions lib/ui/page/home/tab/chats/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,16 @@ import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:super_drag_and_drop/super_drag_and_drop.dart';

import '/ui/page/home/page/chat/message_field/controller.dart';
import '/domain/model/attachment.dart';
import '/domain/model/native_file.dart';
import '/domain/model/sending_status.dart';
import '/l10n/l10n.dart';
import '/util/data_reader.dart';
import '/domain/model/chat.dart';
import '/domain/model/chat_item.dart';
import '/domain/model/contact.dart';
import '/domain/model/mute_duration.dart';
import '/domain/model/my_user.dart';
import '/domain/model/native_file.dart';
import '/domain/model/ongoing_call.dart';
import '/domain/model/precise_date_time/precise_date_time.dart';
import '/domain/model/sending_status.dart';
import '/domain/model/user.dart';
import '/domain/repository/call.dart'
show
Expand All @@ -57,6 +54,7 @@ import '/domain/service/contact.dart';
import '/domain/service/my_user.dart';
import '/domain/service/session.dart';
import '/domain/service/user.dart';
import '/l10n/l10n.dart';
import '/provider/gql/exceptions.dart'
show
ClearChatException,
Expand All @@ -70,7 +68,9 @@ import '/provider/gql/exceptions.dart'
UploadAttachmentException;
import '/routes.dart';
import '/ui/page/call/search/controller.dart';
import '/ui/page/home/page/chat/message_field/controller.dart';
import '/ui/widget/text_field.dart';
import '/util/data_reader.dart';
import '/util/message_popup.dart';
import '/util/obs/obs.dart';
import '/util/platform_utils.dart';
Expand Down Expand Up @@ -566,7 +566,7 @@ class ChatsTabController extends GetxController {
/// Drops an [OngoingCall] in a [Chat] identified by its [id], if any.
Future<void> dropCall(ChatId id) => _callService.leave(id);

/// Sends the dropped [files] to the [Chat] identified by its [id].
/// Sends the dropped files of [event] to the [Chat] identified by its [id].
Future<void> sendFiles(ChatId id, PerformDropEvent event) async {
final List<Attachment> attachments = [];

Expand Down
1 change: 1 addition & 0 deletions lib/ui/page/home/tab/chats/widget/recent_chat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ class RecentChatTile extends StatefulWidget {
);
}

/// State class for the [RecentChatTile].
class _RecentChatTileState extends State<RecentChatTile> {
/// Indicator whether there is an ongoing drag-n-drop at the moment.
final RxBool _isDraggingFiles = RxBool(false);
Expand Down
2 changes: 1 addition & 1 deletion lib/util/data_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extension DropItemExtension on DataReader {
format,
(DataReaderFile file) async {
try {
// Read the file bytes asynchronously
// Read the file bytes asynchronously.
final Uint8List bytes = await file.readAll();

final PlatformFile platformFile = PlatformFile(
Expand Down

0 comments on commit 0a9b75a

Please sign in to comment.