forked from github/szkolny
[APIv2] Move AppError to API directory.
This commit is contained in:
parent
55e32b8d88
commit
c2f91e6867
@ -5,8 +5,8 @@ import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_AGENDA
|
||||
import pl.szczodrzynski.edziennik.MainActivity.Companion.DRAWER_ITEM_HOMEWORK
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.api.v2.models.ApiError
|
||||
import pl.szczodrzynski.edziennik.api.v2.models.AppError.CODE_APP_SERVER_ERROR
|
||||
import pl.szczodrzynski.edziennik.api.v2.models.Data
|
||||
import pl.szczodrzynski.edziennik.data.api.AppError.CODE_APP_SERVER_ERROR
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.events.Event
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.events.Event.TYPE_HOMEWORK
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.login.LoginStore
|
||||
@ -176,4 +176,4 @@ class ServerSync(val data: Data, val onSuccess: () -> Unit) {
|
||||
|
||||
onSuccess()
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,8 @@ import pl.szczodrzynski.edziennik.api.v2.librus.data.LibrusPortal
|
||||
import pl.szczodrzynski.edziennik.api.v2.librus.login.LibrusLoginApi
|
||||
import pl.szczodrzynski.edziennik.api.v2.librus.login.LibrusLoginPortal
|
||||
import pl.szczodrzynski.edziennik.api.v2.models.ApiError
|
||||
import pl.szczodrzynski.edziennik.data.api.AppError.CODE_LIBRUS_DISCONNECTED
|
||||
import pl.szczodrzynski.edziennik.data.api.AppError.CODE_SYNERGIA_NOT_ACTIVATED
|
||||
import pl.szczodrzynski.edziennik.api.v2.models.AppError.CODE_LIBRUS_DISCONNECTED
|
||||
import pl.szczodrzynski.edziennik.api.v2.models.AppError.CODE_SYNERGIA_NOT_ACTIVATED
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.profiles.Profile
|
||||
|
||||
class LibrusFirstLogin(val data: DataLibrus, val onSuccess: () -> Unit) {
|
||||
@ -89,4 +89,4 @@ class LibrusFirstLogin(val data: DataLibrus, val onSuccess: () -> Unit) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ import android.content.Context
|
||||
import com.google.gson.JsonObject
|
||||
import im.wangchao.mhttp.Request
|
||||
import im.wangchao.mhttp.Response
|
||||
import pl.szczodrzynski.edziennik.data.api.AppError
|
||||
|
||||
class ApiError(val tag: String, val errorCode: Int) {
|
||||
var profileId: Int? = null
|
||||
@ -67,4 +66,4 @@ class ApiError(val tag: String, val errorCode: Int) {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,8 @@
|
||||
package pl.szczodrzynski.edziennik.data.api;
|
||||
/*
|
||||
* Copyright (c) Kacper Ziubryniewicz 2019-11-26
|
||||
*/
|
||||
|
||||
package pl.szczodrzynski.edziennik.api.v2.models;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
@ -10,7 +10,7 @@ import pl.szczodrzynski.edziennik.api.v2.DataNotifications
|
||||
import pl.szczodrzynski.edziennik.api.v2.EXCEPTION_NOTIFY_AND_SYNC
|
||||
import pl.szczodrzynski.edziennik.api.v2.ServerSync
|
||||
import pl.szczodrzynski.edziennik.api.v2.interfaces.EndpointCallback
|
||||
import pl.szczodrzynski.edziennik.data.api.AppError.*
|
||||
import pl.szczodrzynski.edziennik.api.v2.models.AppError.*
|
||||
import pl.szczodrzynski.edziennik.data.db.AppDb
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.announcements.Announcement
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.api.EndpointTimer
|
||||
|
@ -19,8 +19,8 @@ import pl.szczodrzynski.edziennik.api.v2.models.ApiError;
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentLoginIuczniowieBinding;
|
||||
import pl.szczodrzynski.edziennik.ui.modules.error.ErrorSnackbar;
|
||||
|
||||
import static pl.szczodrzynski.edziennik.data.api.AppError.CODE_INVALID_LOGIN;
|
||||
import static pl.szczodrzynski.edziennik.data.api.AppError.CODE_INVALID_SCHOOL_NAME;
|
||||
import static pl.szczodrzynski.edziennik.api.v2.models.AppError.CODE_INVALID_LOGIN;
|
||||
import static pl.szczodrzynski.edziennik.api.v2.models.AppError.CODE_INVALID_SCHOOL_NAME;
|
||||
import static pl.szczodrzynski.edziennik.data.db.modules.login.LoginStore.LOGIN_TYPE_IUCZNIOWIE;
|
||||
|
||||
public class LoginIuczniowieFragment extends Fragment {
|
||||
|
@ -19,10 +19,10 @@ import pl.szczodrzynski.edziennik.api.v2.models.ApiError;
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentLoginMobidziennikBinding;
|
||||
import pl.szczodrzynski.edziennik.ui.modules.error.ErrorSnackbar;
|
||||
|
||||
import static pl.szczodrzynski.edziennik.data.api.AppError.CODE_ARCHIVED;
|
||||
import static pl.szczodrzynski.edziennik.data.api.AppError.CODE_INVALID_LOGIN;
|
||||
import static pl.szczodrzynski.edziennik.data.api.AppError.CODE_INVALID_SERVER_ADDRESS;
|
||||
import static pl.szczodrzynski.edziennik.data.api.AppError.CODE_OLD_PASSWORD;
|
||||
import static pl.szczodrzynski.edziennik.api.v2.models.AppError.CODE_ARCHIVED;
|
||||
import static pl.szczodrzynski.edziennik.api.v2.models.AppError.CODE_INVALID_LOGIN;
|
||||
import static pl.szczodrzynski.edziennik.api.v2.models.AppError.CODE_INVALID_SERVER_ADDRESS;
|
||||
import static pl.szczodrzynski.edziennik.api.v2.models.AppError.CODE_OLD_PASSWORD;
|
||||
import static pl.szczodrzynski.edziennik.data.db.modules.login.LoginStore.LOGIN_TYPE_MOBIDZIENNIK;
|
||||
|
||||
public class LoginMobidziennikFragment extends Fragment {
|
||||
|
@ -39,10 +39,10 @@ import pl.szczodrzynski.edziennik.ui.modules.error.ErrorSnackbar;
|
||||
import pl.szczodrzynski.edziennik.ui.modules.webpush.QrScannerActivity;
|
||||
import pl.szczodrzynski.edziennik.utils.Utils;
|
||||
|
||||
import static pl.szczodrzynski.edziennik.data.api.AppError.CODE_EXPIRED_TOKEN;
|
||||
import static pl.szczodrzynski.edziennik.data.api.AppError.CODE_INVALID_PIN;
|
||||
import static pl.szczodrzynski.edziennik.data.api.AppError.CODE_INVALID_SYMBOL;
|
||||
import static pl.szczodrzynski.edziennik.data.api.AppError.CODE_INVALID_TOKEN;
|
||||
import static pl.szczodrzynski.edziennik.api.v2.models.AppError.CODE_EXPIRED_TOKEN;
|
||||
import static pl.szczodrzynski.edziennik.api.v2.models.AppError.CODE_INVALID_PIN;
|
||||
import static pl.szczodrzynski.edziennik.api.v2.models.AppError.CODE_INVALID_SYMBOL;
|
||||
import static pl.szczodrzynski.edziennik.api.v2.models.AppError.CODE_INVALID_TOKEN;
|
||||
import static pl.szczodrzynski.edziennik.data.db.modules.login.LoginStore.LOGIN_TYPE_VULCAN;
|
||||
|
||||
public class LoginVulcanFragment extends Fragment {
|
||||
|
Loading…
x
Reference in New Issue
Block a user