Compare commits
No commits in common. "815f00e764c6117d8d0e06b82f1d1cb8d885433c" and "ff6038dbd4b652b0881a0509fde2df50fe4e3f43" have entirely different histories.
815f00e764
...
ff6038dbd4
@ -1,22 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
package="bou.amine.apps.readerforselfossv2.android">
|
package="bou.amine.apps.readerforselfossv2.android">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="false"
|
|
||||||
android:fullBackupContent="false"
|
|
||||||
tools:replace="android:allowBackup"
|
|
||||||
android:name=".MyApp"
|
android:name=".MyApp"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:networkSecurityConfig="@xml/network_security_config"
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
android:theme="@style/NoBar"
|
android:theme="@style/NoBar">
|
||||||
android:dataExtractionRules="@xml/data_extraction_rules">
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:theme="@style/SplashTheme"
|
android:theme="@style/SplashTheme"
|
||||||
|
@ -11,7 +11,6 @@ import android.view.MenuItem
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
|
||||||
import androidx.appcompat.app.ActionBarDrawerToggle
|
import androidx.appcompat.app.ActionBarDrawerToggle
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
@ -63,10 +62,12 @@ import org.kodein.di.DIAware
|
|||||||
import org.kodein.di.android.closestDI
|
import org.kodein.di.android.closestDI
|
||||||
import org.kodein.di.instance
|
import org.kodein.di.instance
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
import kotlin.concurrent.thread
|
||||||
|
|
||||||
|
|
||||||
class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAware {
|
class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAware {
|
||||||
|
|
||||||
|
private val SETTINGS_ACTIVITY: Int = 101111
|
||||||
private val DRAWER_ID_TAGS = 100101L
|
private val DRAWER_ID_TAGS = 100101L
|
||||||
private val DRAWER_ID_HIDDEN_TAGS = 101100L
|
private val DRAWER_ID_HIDDEN_TAGS = 101100L
|
||||||
private val DRAWER_ID_SOURCES = 100110L
|
private val DRAWER_ID_SOURCES = 100110L
|
||||||
@ -93,10 +94,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar
|
|||||||
|
|
||||||
private lateinit var tagsBadge: Map<Long, Int>
|
private lateinit var tagsBadge: Map<Long, Int>
|
||||||
|
|
||||||
private val settingsLauncher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
|
|
||||||
appSettingsService.refreshUserSettings()
|
|
||||||
}
|
|
||||||
|
|
||||||
override val di by closestDI()
|
override val di by closestDI()
|
||||||
private val repository : Repository by instance()
|
private val repository : Repository by instance()
|
||||||
private val appSettingsService : AppSettingsService by instance()
|
private val appSettingsService : AppSettingsService by instance()
|
||||||
@ -370,7 +367,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
addStickyPrimaryItem(R.string.title_activity_settings, R.drawable.ic_settings_black_24dp) { _, _, _ ->
|
addStickyPrimaryItem(R.string.title_activity_settings, R.drawable.ic_settings_black_24dp) { _, _, _ ->
|
||||||
settingsLauncher.launch(Intent(this, SettingsActivity::class.java))
|
startActivityForResult(Intent(this@HomeActivity, SettingsActivity::class.java), SETTINGS_ACTIVITY)
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -949,5 +946,12 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar
|
|||||||
WorkManager.getInstance(baseContext).enqueueUniquePeriodicWork("selfoss-loading", ExistingPeriodicWorkPolicy.KEEP, backgroundWork)
|
WorkManager.getInstance(baseContext).enqueueUniquePeriodicWork("selfoss-loading", ExistingPeriodicWorkPolicy.KEEP, backgroundWork)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data)
|
||||||
|
if (requestCode == SETTINGS_ACTIVITY) {
|
||||||
|
appSettingsService.refreshUserSettings()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,13 +69,11 @@ class SettingsActivity : AppCompatActivity(),
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onSupportNavigateUp(): Boolean {
|
override fun onSupportNavigateUp(): Boolean {
|
||||||
return if (supportFragmentManager.popBackStackImmediate()) {
|
if (supportFragmentManager.popBackStackImmediate()) {
|
||||||
supportActionBar?.title = getText(R.string.title_activity_settings)
|
supportActionBar?.title = getText(R.string.title_activity_settings)
|
||||||
false
|
return true
|
||||||
} else {
|
|
||||||
super.onBackPressed()
|
|
||||||
true
|
|
||||||
}
|
}
|
||||||
|
return super.onSupportNavigateUp()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPreferenceStartFragment(
|
override fun onPreferenceStartFragment(
|
||||||
@ -218,4 +216,11 @@ class SettingsActivity : AppCompatActivity(),
|
|||||||
setPreferencesFromResource(R.xml.pref_experimental, rootKey)
|
setPreferencesFromResource(R.xml.pref_experimental, rootKey)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||||
|
when (item.itemId) {
|
||||||
|
android.R.id.home -> super.onBackPressed()
|
||||||
|
}
|
||||||
|
return super.onOptionsItemSelected(item)
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<data-extraction-rules>
|
|
||||||
<cloud-backup>
|
|
||||||
<exclude domain="root" />
|
|
||||||
<exclude domain="file" />
|
|
||||||
<exclude domain="database" />
|
|
||||||
<exclude domain="sharedpref" />
|
|
||||||
<exclude domain="external" />
|
|
||||||
</cloud-backup>
|
|
||||||
<device-transfer>
|
|
||||||
<exclude domain="root" />
|
|
||||||
<exclude domain="file" />
|
|
||||||
<exclude domain="database" />
|
|
||||||
<exclude domain="sharedpref" />
|
|
||||||
<exclude domain="external" />
|
|
||||||
</device-transfer>
|
|
||||||
</data-extraction-rules>
|
|
Loading…
Reference in New Issue
Block a user