mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-28 06:14:00 +02:00
Simplify nullable return
This commit is contained in:
@@ -87,8 +87,7 @@ object DeviceManager {
|
|||||||
* @return The ServerConnectionConfig instance or null if not found.
|
* @return The ServerConnectionConfig instance or null if not found.
|
||||||
*/
|
*/
|
||||||
fun getServerConnectionConfig(id: String?): ServerConnectionConfig? {
|
fun getServerConnectionConfig(id: String?): ServerConnectionConfig? {
|
||||||
if (id == null) return null
|
return id?.let { deviceData.serverConnectionConfigs.find { it.id == id } }
|
||||||
return deviceData.serverConnectionConfigs.find { it.id == id }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user