[Dialog/EventManual] Unshare using eventObject instead of editingEvent.

This commit is contained in:
Kacper Ziubryniewicz 2019-12-14 17:31:34 +01:00
parent ad5afac174
commit b8cf731dd0
2 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ import java.util.concurrent.TimeUnit.SECONDS
class SzkolnyApi(val app: App) {
private var api: SzkolnyService
private val api: SzkolnyService
init {
val okHttpClient: OkHttpClient = app.http.newBuilder()

View File

@ -628,8 +628,8 @@ class EventManualDialog(
else if (!share && editingShared) {
Toast.makeText(activity, "Unshare own event", Toast.LENGTH_SHORT).show()
editingEvent?.let { SzkolnyTask.unshareEvent(it).enqueue(activity) }
finishRemoving()
SzkolnyTask.unshareEvent(eventObject.withMetadata(metadataObject)).enqueue(activity)
finishAdding(eventObject, metadataObject)
}
else if (share) {
Toast.makeText(activity, "Share/update own event", Toast.LENGTH_SHORT).show()