Openhumans: fix plugin type

This commit is contained in:
Milos Kozak 2023-02-04 19:35:04 +01:00
parent 65123fe527
commit d346e2e459
2 changed files with 8 additions and 1 deletions

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<application>
<activity
android:name=".ui.OHLoginActivity"

View file

@ -30,6 +30,7 @@ import info.nightscout.database.impl.AppRepository
import info.nightscout.interfaces.plugin.PluginBase
import info.nightscout.interfaces.plugin.PluginDescription
import info.nightscout.interfaces.plugin.PluginType
import info.nightscout.interfaces.sync.Sync
import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.events.EventPreferenceChange
import info.nightscout.rx.logging.AAPSLogger
@ -67,7 +68,7 @@ class OpenHumansUploaderPlugin @Inject internal constructor(
counterDelegate: OHCounterDelegate,
appIdDelegate: OHAppIDDelegate,
private val rxBus: RxBus
) : PluginBase(
) : Sync, PluginBase(
PluginDescription()
.mainType(PluginType.SYNC)
.pluginIcon(R.drawable.open_humans_white)
@ -85,6 +86,11 @@ class OpenHumansUploaderPlugin @Inject internal constructor(
private val preferenceChangeDisposable = CompositeDisposable()
// Not used Sync interface members
override val hasWritePermission: Boolean = true
override val connected: Boolean = true
override val status: String = ""
override fun onStart() {
super.onStart()
setupNotificationChannels()