diff --git a/app/src/main/java/com/orgzly/android/widgets/ListWidgetProvider.java b/app/src/main/java/com/orgzly/android/widgets/ListWidgetProvider.java index fd42a9d60..ee1856e58 100644 --- a/app/src/main/java/com/orgzly/android/widgets/ListWidgetProvider.java +++ b/app/src/main/java/com/orgzly/android/widgets/ListWidgetProvider.java @@ -14,6 +14,7 @@ import com.orgzly.BuildConfig; import com.orgzly.R; +import com.orgzly.android.ActionReceiver; import com.orgzly.android.App; import com.orgzly.android.AppIntent; import com.orgzly.android.data.DataRepository; @@ -107,6 +108,16 @@ private void updateAppWidgetLayout(Context context, AppWidgetManager appWidgetMa R.id.list_widget_header_add, ShareActivity.createNewNotePendingIntent(context, "widget-" + appWidgetId, savedSearch)); + // Sync icon - sync start + final Intent onSyncIntent = new Intent(context, ActionReceiver.class); + onSyncIntent.setAction(AppIntent.ACTION_SYNC_START); + final PendingIntent onSyncPendingIntent = PendingIntent.getBroadcast( + context, + 0, + onSyncIntent, + ActivityUtils.mutable(PendingIntent.FLAG_UPDATE_CURRENT)); + remoteViews.setOnClickPendingIntent(R.id.list_widget_header_sync, onSyncPendingIntent); + // Logo - open query Intent openIntent = Intent.makeRestartActivityTask(new ComponentName(context, MainActivity.class)); openIntent.putExtra(AppIntent.EXTRA_QUERY_STRING, savedSearch.getQuery()); diff --git a/app/src/main/res/layout/list_widget.xml b/app/src/main/res/layout/list_widget.xml index bf33b930b..70beb6994 100644 --- a/app/src/main/res/layout/list_widget.xml +++ b/app/src/main/res/layout/list_widget.xml @@ -3,10 +3,13 @@ + + + + + - \ No newline at end of file + + diff --git a/build.gradle b/build.gradle index 21b8cf5e7..775937ede 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { def versions = [:] - versions.android_gradle_plugin = '7.3.1' + versions.android_gradle_plugin = '7.4.2' versions.kotlin = '1.7.20' diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4ab3c681f..fa5d7088e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Sat Jan 29 20:23:20 CET 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME