diff options
4 files changed, 15 insertions, 11 deletions
diff --git a/library/src/main/java/com/nextcloud/android/lib/resources/dashboard/DashBoardButtonType.kt b/library/src/main/java/com/nextcloud/android/lib/resources/dashboard/DashBoardButtonType.kt index d1833397..3ca61f23 100644 --- a/library/src/main/java/com/nextcloud/android/lib/resources/dashboard/DashBoardButtonType.kt +++ b/library/src/main/java/com/nextcloud/android/lib/resources/dashboard/DashBoardButtonType.kt @@ -27,8 +27,10 @@ import com.google.gson.annotations.SerializedName enum class DashBoardButtonType() { @SerializedName("new") NEW, + @SerializedName("more") MORE, + @SerializedName("setup") SETUP } diff --git a/library/src/main/java/com/nextcloud/android/lib/resources/dashboard/DashboardGetWidgetItemsRemoteOperation.kt b/library/src/main/java/com/nextcloud/android/lib/resources/dashboard/DashboardGetWidgetItemsRemoteOperation.kt index d6e550e8..18455a69 100644 --- a/library/src/main/java/com/nextcloud/android/lib/resources/dashboard/DashboardGetWidgetItemsRemoteOperation.kt +++ b/library/src/main/java/com/nextcloud/android/lib/resources/dashboard/DashboardGetWidgetItemsRemoteOperation.kt @@ -4,20 +4,20 @@ * @author Tobias Kaminsky * Copyright (C) 2022 Tobias Kaminsky * Copyright (C) 2022 Nextcloud GmbH - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. - * + * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * + * */ package com.nextcloud.android.lib.resources.dashboard @@ -44,7 +44,8 @@ class DashboardGetWidgetItemsRemoteOperation(val id: String) : val status = client.execute(get) if (status == HttpStatus.SC_OK) { - val list = getServerResponse(get, + val list = getServerResponse( + get, object : TypeToken<ServerResponse<HashMap<String, List<DashboardWidgetItem>>>>() {} ).ocs.data diff --git a/library/src/main/java/com/nextcloud/android/lib/resources/dashboard/DashboardListWidgetsRemoteOperation.kt b/library/src/main/java/com/nextcloud/android/lib/resources/dashboard/DashboardListWidgetsRemoteOperation.kt index ad87171a..0beb1e16 100644 --- a/library/src/main/java/com/nextcloud/android/lib/resources/dashboard/DashboardListWidgetsRemoteOperation.kt +++ b/library/src/main/java/com/nextcloud/android/lib/resources/dashboard/DashboardListWidgetsRemoteOperation.kt @@ -4,20 +4,20 @@ * @author Tobias Kaminsky * Copyright (C) 2022 Tobias Kaminsky * Copyright (C) 2022 Nextcloud GmbH - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. - * + * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * + * */ package com.nextcloud.android.lib.resources.dashboard @@ -42,7 +42,8 @@ class DashboardListWidgetsRemoteOperation : OCSRemoteOperation<HashMap<String, D val status = client.execute(get) if (status == HttpStatus.SC_OK) { - val list = getServerResponse(get, + val list = getServerResponse( + get, object : TypeToken<ServerResponse<HashMap<String, DashboardWidget>>>() {} ).ocs.data diff --git a/library/src/main/java/com/nextcloud/android/lib/resources/dashboard/DashboardWidgetItem.kt b/library/src/main/java/com/nextcloud/android/lib/resources/dashboard/DashboardWidgetItem.kt index eb73af57..94d932fd 100644 --- a/library/src/main/java/com/nextcloud/android/lib/resources/dashboard/DashboardWidgetItem.kt +++ b/library/src/main/java/com/nextcloud/android/lib/resources/dashboard/DashboardWidgetItem.kt @@ -26,5 +26,5 @@ data class DashboardWidgetItem( val title: String, val subtitle: String, val link: String, - val iconUrl: String, + val iconUrl: String ) |