Skip to content

Pump common abstract layer extensions#4529

Merged
MilosKozak merged 3 commits intonightscout:devfrom
andyrozman:pre_tandem
Feb 9, 2026
Merged

Pump common abstract layer extensions#4529
MilosKozak merged 3 commits intonightscout:devfrom
andyrozman:pre_tandem

Conversation

@andyrozman
Copy link
Contributor

  • added new classes for pump common and extend PumpPluginAbstract class and all classes using it (Medtronic only atm)

…ss and all classes usings it (Medtronic only atm)
implementation(project(":core:interfaces"))
implementation(project(":core:utils"))
implementation(project(":core:ui"))
implementation(project(":implementation"))
Copy link
Contributor

@MilosKozak MilosKozak Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is wrong. implementation module is the highest level, which should not be included anywhere.
it would slow down compilation significantly.
use interfaces instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed and refactored the code

return getOperationNotSupportedWithCustomText(R.string.pump_operation_not_supported_by_pump_driver)
}

fun getJSONStatus(profile: Profile, profileName: String, version: String): JSONObject {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been generalized over all Pump plugins

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

}

// FIXME i18n, null checks: iob, TDD
fun shortStatus(veryShort: Boolean): String {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been generalized over all pump plugins

- removed dependency and refactored code that needed it
@andyrozman
Copy link
Contributor Author

All problems fixed...


fun prerequisitesCheck(activity: AppCompatActivity): Boolean

fun prerequisitesCheck(activity: AppCompatActivity, additionalPermissions: List<String>?): Boolean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's do fun prerequisitesCheck(activity: AppCompatActivity, additionalPermissions: List<String>? = null): Boolean
and have only one function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Fixed.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

@andyrozman
Copy link
Contributor Author

Fixed

@MilosKozak MilosKozak merged commit 7894af2 into nightscout:dev Feb 9, 2026
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants