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

Commit 914afc8f authored by Amit Kumar's avatar Amit Kumar Committed by Romain Hunault
Browse files

Show and sync all calendars associated with an account

parent eb28788b
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -169,6 +169,7 @@ class DavResourceFinder(
                            try {
                                val uri = URI(href)
                                if (uri.scheme.equals("mailto", true))
                                    log.info("myenail: ${uri.schemeSpecificPart}")
                                    config.email = uri.schemeSpecificPart
                            } catch(e: URISyntaxException) {
                                log.log(Level.WARNING, "Couldn't parse user address", e)
@@ -205,7 +206,7 @@ class DavResourceFinder(
                    }
                }
                Service.CALDAV -> {
                    davBase.propfind(0,
                    davBase.propfind(1,
                            ResourceType.NAME, DisplayName.NAME, CalendarColor.NAME, CalendarDescription.NAME, CalendarTimezone.NAME, CurrentUserPrivilegeSet.NAME, SupportedCalendarComponentSet.NAME,
                            CalendarHomeSet.NAME,
                            CurrentUserPrincipal.NAME
+3 −3
Original line number Diff line number Diff line
@@ -348,10 +348,10 @@ class GoogleAuthenticatorFragment : Fragment(), AuthorizationService.TokenRespon
    }

    private fun validateLoginData(emailAddress: String, authState: AuthState): LoginInfo? {
        val baseUrl = Uri.parse("https://apidata.googleusercontent.com/caldav/v2/$emailAddress/events")
        val uri = validateBaseUrl(baseUrl, false, { message ->
        val baseUrl = Uri.parse("https://apidata.googleusercontent.com/caldav/v2/$emailAddress/user")
        val uri = validateBaseUrl(baseUrl, false) { message ->
            view!!.urlpwd_base_url.error = message
        })
        }

        return if (uri != null)
            LoginInfo(uri, emailAddress, null, authState, null)