Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7fb26d3 authored by Sayantan Roychowdhury's avatar Sayantan Roychowdhury
Browse files

add new source - GITLAB

parent e6413cd6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -120,6 +120,10 @@ class HomeApiImpl @Inject constructor(
            Source.PWA -> handleNetworkResult {
                handleCleanApkHomes(priorList, SearchApi.APP_TYPE_PWA)
            }

            Source.GITLAB -> {
                ResultSupreme.Error(message = "Gitlab source not allowed")
            }
        }

        setHomeErrorMessage(result.getResultStatus(), source)
@@ -223,6 +227,7 @@ class HomeApiImpl @Inject constructor(
        if (apiStatus != ResultStatus.OK) {
            apiStatus.message = when (source) {
                Source.GPLAY -> ("GPlay home loading error\n" + apiStatus.message).trim()
                Source.GITLAB -> ("Gitlab home not allowed\n" + apiStatus.message).trim()
                Source.OPEN -> ("Open Source home loading error\n" + apiStatus.message).trim()
                Source.PWA -> ("PWA home loading error\n" + apiStatus.message).trim()
            }
+2 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package foundation.e.apps.data.enums

enum class Source {
    GPLAY,
    GITLAB,
    OPEN,
    PWA;

@@ -27,6 +28,7 @@ enum class Source {
            return when (source) {
                "Open Source" -> OPEN
                "PWA" -> PWA
                "GITLAB" -> GITLAB
                else -> GPLAY
            }
        }