mirror of
https://github.com/bitfireAT/davx5-ose.git
synced 2026-01-22 13:48:07 -05:00
Compare commits
2 Commits
backups-sc
...
v2.6.6-ose
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74c8caf452 | ||
|
|
363aac1c99 |
@@ -19,7 +19,7 @@ android {
|
||||
defaultConfig {
|
||||
applicationId "at.bitfire.davdroid"
|
||||
|
||||
versionCode 334
|
||||
versionCode 206060000
|
||||
buildConfigField "long", "buildTime", System.currentTimeMillis() + "L"
|
||||
buildConfigField "boolean", "customCerts", "true"
|
||||
|
||||
@@ -44,7 +44,7 @@ android {
|
||||
flavorDimensions "distribution"
|
||||
productFlavors {
|
||||
standard {
|
||||
versionName "2.6.5-ose"
|
||||
versionName "2.6.6-ose"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,6 +117,9 @@ class LocalAddressBook(
|
||||
|
||||
}
|
||||
|
||||
override val tag: String
|
||||
get() = "contacts-${account.name}"
|
||||
|
||||
override val title = account.name!!
|
||||
|
||||
/**
|
||||
|
||||
@@ -85,6 +85,9 @@ class LocalCalendar private constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override val tag: String
|
||||
get() = "events-${account.name}-$id"
|
||||
|
||||
override val title: String
|
||||
get() = displayName ?: id.toString()
|
||||
|
||||
|
||||
@@ -13,6 +13,9 @@ import at.bitfire.davdroid.model.SyncState
|
||||
|
||||
interface LocalCollection<out T: LocalResource<*>> {
|
||||
|
||||
/** a tag that uniquely identifies the collection (DAVx5-wide) */
|
||||
val tag: String
|
||||
|
||||
/** collection title (used for user notifications etc.) **/
|
||||
val title: String
|
||||
|
||||
|
||||
@@ -88,6 +88,9 @@ class LocalTaskList private constructor(
|
||||
|
||||
}
|
||||
|
||||
override val tag: String
|
||||
get() = "tasks-${account.name}-$id"
|
||||
|
||||
override val title: String
|
||||
get() = name ?: id.toString()
|
||||
|
||||
|
||||
@@ -118,7 +118,6 @@ abstract class SyncAdapterService: Service() {
|
||||
// required for dav4jvm (ServiceLoader)
|
||||
Thread.currentThread().contextClassLoader = context.classLoader
|
||||
|
||||
SyncManager.cancelNotifications(NotificationManagerCompat.from(context), authority, account)
|
||||
sync(account, extras, authority, provider, syncResult)
|
||||
} finally {
|
||||
synchronized(runningSyncs) {
|
||||
|
||||
@@ -77,12 +77,6 @@ abstract class SyncManager<ResourceType: LocalResource<*>, out CollectionType: L
|
||||
min(Runtime.getRuntime().availableProcessors(), 2)
|
||||
const val MAX_MULTIGET_RESOURCES = 10
|
||||
|
||||
fun cancelNotifications(manager: NotificationManagerCompat, authority: String, account: Account) =
|
||||
manager.cancel(notificationTag(authority, account), NotificationUtils.NOTIFY_SYNC_ERROR)
|
||||
|
||||
private fun notificationTag(authority: String, account: Account) =
|
||||
"$authority-${account.name}".hashCode().toString()
|
||||
|
||||
}
|
||||
|
||||
init {
|
||||
@@ -95,7 +89,7 @@ abstract class SyncManager<ResourceType: LocalResource<*>, out CollectionType: L
|
||||
account
|
||||
|
||||
protected val notificationManager = NotificationManagerCompat.from(context)
|
||||
protected val notificationTag = notificationTag(authority, mainAccount)
|
||||
protected val notificationTag = localCollection.tag
|
||||
|
||||
protected val httpClient = HttpClient.Builder(context, accountSettings).build()
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import at.bitfire.davdroid.R
|
||||
import at.bitfire.davdroid.databinding.LoginCredentialsFragmentBinding
|
||||
import at.bitfire.davdroid.model.Credentials
|
||||
@@ -31,8 +31,8 @@ class DefaultLoginCredentialsFragment: Fragment() {
|
||||
private lateinit var loginModel: LoginModel
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
||||
model = ViewModelProviders.of(this).get(DefaultLoginCredentialsModel::class.java)
|
||||
loginModel = ViewModelProviders.of(requireActivity()).get(LoginModel::class.java)
|
||||
model = ViewModelProvider(this).get(DefaultLoginCredentialsModel::class.java)
|
||||
loginModel = ViewModelProvider(requireActivity()).get(LoginModel::class.java)
|
||||
|
||||
val v = LoginCredentialsFragmentBinding.inflate(inflater, container, false)
|
||||
v.lifecycleOwner = viewLifecycleOwner
|
||||
@@ -52,7 +52,7 @@ class DefaultLoginCredentialsFragment: Fragment() {
|
||||
|
||||
v.login.setOnClickListener {
|
||||
if (validate())
|
||||
requireFragmentManager().beginTransaction()
|
||||
parentFragmentManager.beginTransaction()
|
||||
.replace(android.R.id.content, DetectConfigurationFragment(), null)
|
||||
.addToBackStack(null)
|
||||
.commit()
|
||||
|
||||
@@ -76,7 +76,7 @@ class NextcloudLoginFlowFragment: Fragment() {
|
||||
)
|
||||
|
||||
// continue to next fragment
|
||||
requireFragmentManager().beginTransaction()
|
||||
parentFragmentManager.beginTransaction()
|
||||
.replace(android.R.id.content, DetectConfigurationFragment(), null)
|
||||
.addToBackStack(null)
|
||||
.commit()
|
||||
|
||||
Reference in New Issue
Block a user