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

display device via internet #1760

Merged
merged 58 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
16c277e
feat: hive store service, display device model
phuocbitmark Jun 12, 2024
8ad52a2
remove unused code
phuocbitmark Jun 12, 2024
3ae38cc
update proto lib
phuocbitmark Jun 12, 2024
d5a2b02
fix: update canvas service
phuocbitmark Jun 13, 2024
d8aba70
fix query
phuocbitmark Jun 13, 2024
f75f196
lint
phuocbitmark Jun 13, 2024
ab80b3c
Merge branch 'develop' into display_device_internet
phuocbitmark Jun 13, 2024
3c0b5bd
remove unused pub
phuocbitmark Jun 13, 2024
9241947
fix: remove cast button on collection page
phuocbitmark Jun 14, 2024
028e9fc
Merge branch 'develop' into display_device_internet
phuocbitmark Jun 14, 2024
38e05c0
fix: no retry for cast api
phuocbitmark Jun 14, 2024
90abf20
remove comment
phuocbitmark Jun 14, 2024
9d58966
fix: add popup after scan qrcode
phuocbitmark Jun 14, 2024
3e4e276
support deeplink
phuocbitmark Jun 14, 2024
918d213
autodismiss if can not cast
phuocbitmark Jun 14, 2024
681454b
fix branch link canvas
phuocbitmark Jun 14, 2024
fd737bb
remove unused connect query
phuocbitmark Jun 14, 2024
c573f67
remove unused connect query
phuocbitmark Jun 14, 2024
8f25757
fix carousel index
phuocbitmark Jun 14, 2024
84cc08e
remove request local network permission at home
phuocbitmark Jun 17, 2024
ead0e07
fix: manage casting status
phuocbitmark Jun 17, 2024
3482e94
fix controlling device
phuocbitmark Jun 17, 2024
493f64e
Merge pull request #1767 from bitmark-inc/fix_controlling_device
phuocbitmark Jun 17, 2024
d0866a0
request parallel
phuocbitmark Jun 17, 2024
8a0b5ac
fix get all control device
phuocbitmark Jun 17, 2024
aa83aeb
lint
phuocbitmark Jun 17, 2024
a0a77fb
fix text
phuocbitmark Jun 18, 2024
46b8df7
Add gesture
ppupha Jun 18, 2024
3faf563
Merge branch 'develop' into display_device_internet
phuocbitmark Jun 18, 2024
be6d3cd
fix scan item
phuocbitmark Jun 18, 2024
1c63b4f
do not pop on qrpage in canvas case
phuocbitmark Jun 18, 2024
6ed0cc5
fix comment
phuocbitmark Jun 18, 2024
c55c2c4
fix casting fix
phuocbitmark Jun 18, 2024
7c6a0c6
HiveStoreObject initialization
phuocbitmark Jun 18, 2024
2b122a8
improve stream popup
phuocbitmark Jun 19, 2024
c15146e
Merge branch 'develop' into display_device_internet
phuocbitmark Jun 19, 2024
93bbdf1
Merge branch 'display_device_internet' of github.com:bitmark-inc/auto…
phuocbitmark Jun 19, 2024
7a1dd6a
remove print
phuocbitmark Jun 19, 2024
afafa42
fix: add close button
hoangbtmrk Jun 19, 2024
8265500
fix: hide bottom sheet after select devices
hoangbtmrk Jun 19, 2024
b1f09e6
fix: add rotation feature
hoangbtmrk Jun 19, 2024
e73db2b
fix: avoid global variable
hoangbtmrk Jun 19, 2024
97b680d
update assets
hoangbtmrk Jun 19, 2024
ef3972a
Merge pull request #1776 from bitmark-inc/2560/improve-connect-screen…
phuocbitmark Jun 19, 2024
3a1f251
Merge pull request #1772 from bitmark-inc/2526/add_rotation_featured
hoangbtmrk Jun 19, 2024
22489d6
remove unused code
ppupha Jun 21, 2024
13440b9
Merge pull request #1780 from bitmark-inc/Sang/fix/add_gesture
anhnguyenbitmark Jun 21, 2024
b23c718
Merge branch 'develop' into display_device_internet
phuocbitmark Jun 21, 2024
7d6d353
fix: last selected device by key
ppupha Jun 21, 2024
1815311
Update
ppupha Jun 21, 2024
bfa11bb
Update
ppupha Jun 24, 2024
e68a8eb
Update
ppupha Jun 24, 2024
d0073a6
Merge branch 'display_device_internet' into Sang/fix/last_selected_de…
phuocbitmark Jun 24, 2024
cbf7691
Merge pull request #1781 from bitmark-inc/Sang/fix/last_selected_devi…
phuocbitmark Jun 24, 2024
907771e
lint
phuocbitmark Jun 24, 2024
6196ec8
Merge branch 'develop' into display_device_internet
phuocbitmark Jun 24, 2024
b31ce3e
fix: for non cache image use Image.network instead
phuocbitmark Jun 24, 2024
ca14c6b
Merge branch 'develop' into display_device_internet
phuocbitmark Jun 24, 2024
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
4 changes: 4 additions & 0 deletions lib/common/environment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ class Environment {

static String get auClaimSecretKey => dotenv.env['AU_CLAIM_SECRET_KEY'] ?? '';

static String get tvKey => dotenv.env['TV_API_KEY'] ?? '';

static String get tvCastApiUrl => dotenv.env['TV_CAST_API_URL'] ?? '';

static String get tokenWebviewPrefix =>
dotenv.env['TOKEN_WEBVIEW_PREFIX'] ?? '';

Expand Down
27 changes: 14 additions & 13 deletions lib/common/injector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import 'package:autonomy_flutter/gateway/merchandise_api.dart';
import 'package:autonomy_flutter/gateway/postcard_api.dart';
import 'package:autonomy_flutter/gateway/pubdoc_api.dart';
import 'package:autonomy_flutter/gateway/source_exhibition_api.dart';
import 'package:autonomy_flutter/gateway/tv_cast_api.dart';
import 'package:autonomy_flutter/gateway/tzkt_api.dart';
import 'package:autonomy_flutter/screen/bloc/identity/identity_bloc.dart';
import 'package:autonomy_flutter/screen/bloc/subscription/subscription_bloc.dart';
Expand All @@ -41,8 +42,6 @@ import 'package:autonomy_flutter/service/audit_service.dart';
import 'package:autonomy_flutter/service/auth_service.dart';
import 'package:autonomy_flutter/service/autonomy_service.dart';
import 'package:autonomy_flutter/service/backup_service.dart';
import 'package:autonomy_flutter/service/canvas_channel_service.dart';
import 'package:autonomy_flutter/service/canvas_client_service.dart';
import 'package:autonomy_flutter/service/canvas_client_service_v2.dart';
import 'package:autonomy_flutter/service/chat_auth_service.dart';
import 'package:autonomy_flutter/service/chat_service.dart';
Expand All @@ -57,8 +56,8 @@ import 'package:autonomy_flutter/service/domain_service.dart';
import 'package:autonomy_flutter/service/ethereum_service.dart';
import 'package:autonomy_flutter/service/feralfile_service.dart';
import 'package:autonomy_flutter/service/hive_service.dart';
import 'package:autonomy_flutter/service/hive_store_service.dart';
import 'package:autonomy_flutter/service/iap_service.dart';
import 'package:autonomy_flutter/service/mdns_service.dart';
import 'package:autonomy_flutter/service/merchandise_service.dart';
import 'package:autonomy_flutter/service/metric_client_service.dart';
import 'package:autonomy_flutter/service/mix_panel_client_service.dart';
Expand All @@ -79,8 +78,9 @@ import 'package:autonomy_flutter/util/dio_interceptors.dart';
import 'package:autonomy_flutter/util/dio_util.dart';
import 'package:autonomy_flutter/util/log.dart';
import 'package:dio/dio.dart';
import 'package:feralfile_app_tv_proto/feralfile_app_tv_proto.dart';
import 'package:get_it/get_it.dart';
import 'package:http/http.dart';
import 'package:http/http.dart' as http;
import 'package:logging/logging.dart';
import 'package:nft_collection/data/api/indexer_api.dart';
import 'package:nft_collection/graphql/clients/indexer_client.dart';
Expand Down Expand Up @@ -124,6 +124,7 @@ Future<void> setup() async {
migrateV15ToV16,
migrateV16ToV17,
migrateV17ToV18,
migrateV18ToV19,
]).build();

final cloudDB = await $FloorCloudDatabase
Expand Down Expand Up @@ -177,8 +178,7 @@ Future<void> setup() async {

injector.registerSingleton<ConfigurationService>(
ConfigurationServiceImpl(sharedPreferences));

injector.registerLazySingleton(() => Client());
injector.registerLazySingleton(() => http.Client());
injector.registerLazySingleton<AutonomyService>(
() => AutonomyServiceImpl(injector(), injector()));
injector
Expand Down Expand Up @@ -244,6 +244,8 @@ Future<void> setup() async {
injector.registerLazySingleton<IAPService>(
() => IAPServiceImpl(injector(), injector()));

injector.registerLazySingleton(() =>
TvCastApi(tvCastDio(dioOptions), baseUrl: Environment.tvCastApiUrl));
injector.registerLazySingleton(() => Wc2Service(
injector(),
injector(),
Expand Down Expand Up @@ -318,13 +320,12 @@ Future<void> setup() async {
injector.registerLazySingleton<AppDatabase>(() => mainnetDB);
injector.registerLazySingleton<PlaylistService>(
() => PlayListServiceImp(injector(), injector(), injector(), injector()));

injector.registerLazySingleton<CanvasChannelService>(
() => CanvasChannelService(injector()));
injector.registerLazySingleton<DeviceInfoService>(() => DeviceInfoService());
injector.registerLazySingleton<CanvasClientService>(
() => CanvasClientService(injector(), injector(), injector()));
injector.registerLazySingleton<MDnsService>(() => MDnsService(injector()));

injector.registerLazySingleton<HiveStoreObjectService<CanvasDevice>>(
() => HiveStoreObjectServiceImpl());
await injector<HiveStoreObjectService<CanvasDevice>>()
.init('local.canvas_device');
injector.registerLazySingleton<CanvasClientServiceV2>(() =>
CanvasClientServiceV2(injector(), injector(), injector(), injector()));

Expand Down Expand Up @@ -385,7 +386,7 @@ Future<void> setup() async {
() => IdentityBloc(injector(), injector()));
injector.registerFactory<AuChatBloc>(() => AuChatBloc(injector()));
injector.registerLazySingleton<CanvasDeviceBloc>(
() => CanvasDeviceBloc(injector(), injector(), injector()));
() => CanvasDeviceBloc(injector()));
injector
.registerLazySingleton<ExhibitionBloc>(() => ExhibitionBloc(injector()));
injector.registerLazySingleton<SubscriptionBloc>(
Expand Down
17 changes: 6 additions & 11 deletions lib/database/app_database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@
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';
import 'package:autonomy_flutter/database/entity/draft_customer_support.dart';
import 'package:autonomy_flutter/database/entity/identity.dart';
import 'package:autonomy_flutter/util/log.dart';
import 'package:feralfile_app_tv_proto/feralfile_app_tv_proto.dart';
import 'package:floor/floor.dart';
import 'package:nft_collection/models/token.dart';
import 'package:sqflite/sqflite.dart' as sqflite;
Expand All @@ -25,12 +23,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: 19, entities: [
Identity,
DraftCustomerSupport,
AnnouncementLocal,
CanvasDevice,
Scene,
])
abstract class AppDatabase extends FloorDatabase {
IdentityDao get identityDao;
Expand All @@ -39,16 +35,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 +154,8 @@ 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;');
});
Loading
Loading