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

Show and sync all calendars associated with an account

parent eb28788b
Pipeline #25675 passed with stage
in 7 minutes and 22 seconds
......@@ -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
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment