Skip to content

Commit

Permalink
fix(deps): update dependency com.github.unifiedpush:android-connector…
Browse files Browse the repository at this point in the history
… to v2.5.0 (#915)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[com.github.UnifiedPush:android-connector](https://unifiedpush.org/developers/android/)
([source](https://codeberg.org/UnifiedPush/android-connector)) | `2.4.0`
-> `2.5.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.github.UnifiedPush:android-connector/2.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.github.UnifiedPush:android-connector/2.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.github.UnifiedPush:android-connector/2.4.0/2.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.github.UnifiedPush:android-connector/2.4.0/2.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>UnifiedPush/android-connector
(com.github.UnifiedPush:android-connector)</summary>

###
[`v2.5.0`](https://codeberg.org/UnifiedPush/android-connector/releases/tag/2.5.0)

[Compare
Source](https://codeberg.org/UnifiedPush/android-connector/compare/2.4.0...2.5.0)

- Avoid possible desynchronization that let the app use the token of a
removed instance
- Deprecate `registerAppWithDialog` in favor of the new lib
`org.unifiedpush.android:connector-ui`
- Drop toolchains in favor of compatibility API, removing requirement of
Java version to build project
-   Bump dependencies

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nik Clayton <nik@ngo.org.uk>
  • Loading branch information
renovate[bot] and nikclayton authored Sep 25, 2024
1 parent 5505180 commit 4942460
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ import kotlinx.coroutines.withContext
import org.unifiedpush.android.connector.PREF_MASTER
import org.unifiedpush.android.connector.PREF_MASTER_DISTRIBUTOR
import org.unifiedpush.android.connector.PREF_MASTER_DISTRIBUTOR_ACK
import org.unifiedpush.android.connector.PREF_MASTER_INSTANCE
import org.unifiedpush.android.connector.PREF_MASTER_TOKEN
import org.unifiedpush.android.connector.UnifiedPush
import timber.log.Timber

Expand Down Expand Up @@ -249,24 +247,10 @@ suspend fun disableAllNotifications(context: Context, api: MastodonApi, accountM
}

/**
* Disables all push notifications.
*
* Disables push notifications for each account, and clears the relevant UnifiedPush preferences
* to work around a bug.
* Disables push push notifications for each account.
*/
private suspend fun disablePushNotifications(context: Context, api: MastodonApi, accountManager: AccountManager) {
accountManager.accounts.forEach { disablePushNotificationsForAccount(context, api, accountManager, it) }

// Clear UnifiedPush preferences, to work around
// https://github.com/UnifiedPush/android-connector/issues/85
val prefs = context.getSharedPreferences(PREF_MASTER, Context.MODE_PRIVATE)
prefs.edit().apply {
// Remove the set of instances.
remove(PREF_MASTER_INSTANCE)

// Remove the entry for each instance that points to the instance's token.
prefs.all.filter { it.key.endsWith("/$PREF_MASTER_TOKEN") }.forEach { remove(it.key) }
}.apply()
}

/**
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ timber = "5.0.1"
touchimageview = "3.6"
truth = "1.4.4"
turbine = "1.1.0"
unified-push = "2.4.0"
unified-push = "2.5.0"
xmlwriter = "1.0.4"

# Tool dependencies
Expand Down

0 comments on commit 4942460

Please sign in to comment.