Remove text sharing feature
This commit is contained in:
parent
9eb74b5a8d
commit
90043b5806
@ -22,7 +22,6 @@ import 'package:device_info/device_info.dart';
|
||||
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||
import 'package:in_app_purchase/in_app_purchase.dart';
|
||||
import 'plugins/circular_slider/single_circular_slider.dart';
|
||||
import 'package:receive_sharing_intent/receive_sharing_intent.dart';
|
||||
import 'plugins/dynamic_multi_column_layout.dart';
|
||||
import 'plugins/spoiler_card.dart';
|
||||
import 'package:uni_links/uni_links.dart';
|
||||
|
@ -22,11 +22,9 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker
|
||||
StreamSubscription _showPopupMessageSubscription;
|
||||
StreamSubscription _reloadUISubscription;
|
||||
StreamSubscription _showPageSubscription;
|
||||
StreamSubscription _intentDataStreamSubscription;
|
||||
int _previousViewCount;
|
||||
bool _showLoginButton = false;
|
||||
bool _preventAppRefresh = false;
|
||||
String _savedSharedText;
|
||||
Entity _entityToShow;
|
||||
|
||||
@override
|
||||
@ -60,13 +58,6 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker
|
||||
|
||||
_firebaseMessaging.requestNotificationPermissions(const IosNotificationSettings(sound: true, badge: true, alert: true));
|
||||
|
||||
_intentDataStreamSubscription = ReceiveSharingIntent.getTextStream().listen((String value) {
|
||||
Logger.d("[SHARED] Got share from stream: $value");
|
||||
_handleShare(value);
|
||||
}, onError: (err) {
|
||||
Logger.w("[SHARE] getLinkStream error: $err");
|
||||
});
|
||||
|
||||
// initialise the plugin. app_icon needs to be a added as a drawable resource to the Android head project
|
||||
var initializationSettingsAndroid =
|
||||
new AndroidInitializationSettings('mini_icon');
|
||||
@ -132,17 +123,7 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker
|
||||
});
|
||||
}
|
||||
|
||||
_handleShare(String text) {
|
||||
if (text != null && !HomeAssistant().isNoEntities) {
|
||||
Navigator.pushNamed(context, "/play-media", arguments: {"url": text});
|
||||
}
|
||||
}
|
||||
|
||||
_fetchData() async {
|
||||
ReceiveSharingIntent.getInitialText().then((String value) {
|
||||
Logger.d("[SHARED] Got initial share: $value");
|
||||
_handleShare(value);
|
||||
});
|
||||
await HomeAssistant().fetchData().then((_) {
|
||||
_hideBottomBar();
|
||||
if (_entityToShow != null) {
|
||||
@ -924,7 +905,6 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker
|
||||
_subscription?.cancel();
|
||||
_showPageSubscription?.cancel();
|
||||
_reloadUISubscription?.cancel();
|
||||
_intentDataStreamSubscription?.cancel();
|
||||
//TODO disconnect
|
||||
//widget.homeAssistant?.disconnect();
|
||||
super.dispose();
|
||||
|
@ -30,7 +30,6 @@ dependencies:
|
||||
workmanager: ^0.1.5
|
||||
battery: ^0.3.1+1
|
||||
sentry: ^2.3.1
|
||||
receive_sharing_intent: ^1.3.2
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
|
Reference in New Issue
Block a user