mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
fix: home widget url (#517)
This commit is contained in:
@@ -27,8 +27,8 @@ class HomeWidget : AppWidgetProvider() {
|
||||
private fun updateAppWidget(context: Context, appWidgetManager: AppWidgetManager, appWidgetId: Int) {
|
||||
val views = RemoteViews(context.packageName, R.layout.home_widget)
|
||||
val sp = context.getSharedPreferences("FlutterSharedPreferences", Context.MODE_PRIVATE)
|
||||
var url = sp.getString("$appWidgetId", null)
|
||||
val gUrl = sp.getString("*", null)
|
||||
var url = sp.getString("widget_$appWidgetId", null)
|
||||
val gUrl = sp.getString("widget_*", null)
|
||||
if (url.isNullOrEmpty()) {
|
||||
url = gUrl
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user