Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]2058 new casting UI #1654

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/common/injector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ Future<void> setup() async {
migrateV15ToV16,
migrateV16ToV17,
migrateV17ToV18,
migrateV18ToV19,
]).build();

final cloudDB = await $FloorCloudDatabase
Expand Down Expand Up @@ -320,8 +321,8 @@ Future<void> setup() async {
injector.registerLazySingleton<PlaylistService>(
() => PlayListServiceImp(injector(), injector(), injector(), injector()));

injector.registerLazySingleton<CanvasClientService>(
() => CanvasClientService(injector()));
injector
.registerLazySingleton<CanvasClientService>(() => CanvasClientService());

injector.registerLazySingleton<PostcardService>(
() => PostcardServiceImpl(
Expand Down
16 changes: 7 additions & 9 deletions lib/database/app_database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import 'dart:async';

import 'package:autonomy_flutter/database/dao/announcement_dao.dart';
import 'package:autonomy_flutter/database/dao/canvas_device_dao.dart';
import 'package:autonomy_flutter/database/dao/draft_customer_support_dao.dart';
import 'package:autonomy_flutter/database/dao/identity_dao.dart';
import 'package:autonomy_flutter/database/entity/announcement_local.dart';
Expand All @@ -25,11 +24,10 @@ import 'package:sqflite/sqflite.dart' as sqflite;
part 'app_database.g.dart'; // the generated code will be there

@TypeConverters([DateTimeConverter, TokenOwnersConverter])
@Database(version: 17, entities: [
@Database(version: 18, entities: [
Identity,
DraftCustomerSupport,
AnnouncementLocal,
CanvasDevice,
Scene,
])
abstract class AppDatabase extends FloorDatabase {
Expand All @@ -39,16 +37,10 @@ abstract class AppDatabase extends FloorDatabase {

AnnouncementLocalDao get announcementDao;

CanvasDeviceDao get canvasDeviceDao;

SceneDao get sceneDao;

Future<dynamic> removeAll() async {
await identityDao.removeAll();
await draftCustomerSupportDao.removeAll();
await announcementDao.removeAll();
await canvasDeviceDao.removeAll();
await sceneDao.removeAll();
}
}

Expand Down Expand Up @@ -164,3 +156,9 @@ final migrateV17ToV18 = Migration(17, 18, (database) async {
await database.execute('DROP TABLE IF EXISTS Followee;');
log.info('Migrated App database from version 17 to 18');
});

final migrateV18ToV19 = Migration(18, 19, (database) async {
await database.execute('DROP TABLE IF EXISTS CanvasDevice;');
await database.execute('DROP TABLE IF EXISTS Scene;');
log.info('Migrated App database from version 18 to 18');
});
211 changes: 1 addition & 210 deletions lib/database/app_database.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 0 additions & 50 deletions lib/database/dao/canvas_device_dao.dart

This file was deleted.

13 changes: 6 additions & 7 deletions lib/screen/detail/preview/artwork_preview_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,6 @@ class _ArtworkPreviewPageState extends State<ArtworkPreviewPage>
const SizedBox(
width: 20,
),
CastButton(
onCastTap: () async => _onCastTap(assetToken),
isCasting: isCasting,
),
const SizedBox(
width: 20,
),
GestureDetector(
onTap: isCasting
? null
Expand All @@ -387,6 +380,12 @@ class _ArtworkPreviewPageState extends State<ArtworkPreviewPage>
),
),
),
const SizedBox(
width: 20,
),
FFCastButton(
onDeviceSelected: (deviceID) {},
),
],
),
),
Expand Down
Loading