diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/librus/Librus.kt b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/librus/Librus.kt index 7a15806f..a79a66f8 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/librus/Librus.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/librus/Librus.kt @@ -122,20 +122,22 @@ class Librus(val app: App, val profile: Profile?, val loginStore: LoginStore, va } override fun getAttachment(owner: Any, attachmentId: Long, attachmentName: String) { - login(LOGIN_METHOD_LIBRUS_MESSAGES) { - when (owner) { - is Message -> { + when (owner) { + is Message -> { + login(LOGIN_METHOD_LIBRUS_MESSAGES) { LibrusMessagesGetAttachment(data, owner, attachmentId, attachmentName) { completed() } } - is EventFull -> { + } + is EventFull -> { + login(LOGIN_METHOD_LIBRUS_SYNERGIA) { LibrusSynergiaHomeworkGetAttachment(data, owner, attachmentId, attachmentName) { completed() } } - else -> completed() } + else -> completed() } }