Compare commits
15 Commits
v171811308
...
v171811311
Author | SHA1 | Date | |
---|---|---|---|
332e9f5108 | |||
0b91087c07 | |||
ebbb1ba0f8 | |||
e9143ae852 | |||
42e8ecee78 | |||
4efd76fcbc | |||
fb1614070e | |||
c473dd7227 | |||
76bddb195d | |||
1e02ad2041 | |||
f6ab909f8b | |||
7e520e9bed | |||
32e2d05014 | |||
40d9c97f73 | |||
1aa68d3449 |
@ -1,5 +1,11 @@
|
|||||||
**1.7.x**
|
**1.7.x**
|
||||||
|
|
||||||
|
- Closing #220.
|
||||||
|
|
||||||
|
- Start of #238. "Add a quick shortcut to open the app on offline mode ?"
|
||||||
|
|
||||||
|
- Closes #216. Issue with selfoss version 2.19.
|
||||||
|
|
||||||
- Closes #179. Sync of read/unread/star/unstar items on background task or on app reload with network available.
|
- Closes #179. Sync of read/unread/star/unstar items on background task or on app reload with network available.
|
||||||
|
|
||||||
- Closes #33. Background sync with settings.
|
- Closes #33. Background sync with settings.
|
||||||
|
@ -75,7 +75,6 @@ android {
|
|||||||
buildConfigField "String", "LOGIN_URL", appLoginUrl
|
buildConfigField "String", "LOGIN_URL", appLoginUrl
|
||||||
buildConfigField "String", "LOGIN_USERNAME", appLoginUsername
|
buildConfigField "String", "LOGIN_USERNAME", appLoginUsername
|
||||||
buildConfigField "String", "LOGIN_PASSWORD", appLoginPassword
|
buildConfigField "String", "LOGIN_PASSWORD", appLoginPassword
|
||||||
applicationIdSuffix ".dev"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
flavorDimensions "build"
|
flavorDimensions "build"
|
||||||
|
@ -21,6 +21,9 @@
|
|||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<meta-data android:name="android.app.shortcuts"
|
||||||
|
android:resource="@xml/shortcuts" />
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".LoginActivity"
|
android:name=".LoginActivity"
|
||||||
|
@ -145,6 +145,9 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
private var badgeAll: Int = -1
|
private var badgeAll: Int = -1
|
||||||
private var badgeFavs: Int = -1
|
private var badgeFavs: Int = -1
|
||||||
|
|
||||||
|
private var fromTabShortcut: Boolean = false
|
||||||
|
private var offlineShortcut: Boolean = false
|
||||||
|
|
||||||
private lateinit var tagsBadge: Map<Long, Int>
|
private lateinit var tagsBadge: Map<Long, Int>
|
||||||
|
|
||||||
private lateinit var db: AppDatabase
|
private lateinit var db: AppDatabase
|
||||||
@ -161,6 +164,13 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
|
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
fromTabShortcut = intent.getIntExtra("shortcutTab", -1) != -1
|
||||||
|
offlineShortcut = intent.getBooleanExtra("startOffline", false)
|
||||||
|
|
||||||
|
if (fromTabShortcut) {
|
||||||
|
elementsShown = intent.getIntExtra("shortcutTab", UNREAD_SHOWN)
|
||||||
|
}
|
||||||
|
|
||||||
setContentView(R.layout.activity_home)
|
setContentView(R.layout.activity_home)
|
||||||
|
|
||||||
handleThemeBinding()
|
handleThemeBinding()
|
||||||
@ -203,6 +213,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
R.color.refresh_progress_3
|
R.color.refresh_progress_3
|
||||||
)
|
)
|
||||||
swipeRefreshLayout.setOnRefreshListener {
|
swipeRefreshLayout.setOnRefreshListener {
|
||||||
|
offlineShortcut = false
|
||||||
allItems = ArrayList()
|
allItems = ArrayList()
|
||||||
lastFetchDone = false
|
lastFetchDone = false
|
||||||
handleDrawerItems()
|
handleDrawerItems()
|
||||||
@ -248,7 +259,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
badgeNew--
|
badgeNew--
|
||||||
reloadBadgeContent()
|
reloadBadgeContent()
|
||||||
|
|
||||||
val tagHashes = i.tags.split(",").map { it.longHash() }
|
val tagHashes = i.tags.tags.split(",").map { it.longHash() }
|
||||||
tagsBadge = tagsBadge.map {
|
tagsBadge = tagsBadge.map {
|
||||||
if (tagHashes.contains(it.key)) {
|
if (tagHashes.contains(it.key)) {
|
||||||
(it.key to (it.value - 1))
|
(it.key to (it.value - 1))
|
||||||
@ -318,6 +329,10 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
|
|
||||||
bottomBar.setMode(BottomNavigationBar.MODE_SHIFTING)
|
bottomBar.setMode(BottomNavigationBar.MODE_SHIFTING)
|
||||||
bottomBar.setBackgroundStyle(BottomNavigationBar.BACKGROUND_STYLE_STATIC)
|
bottomBar.setBackgroundStyle(BottomNavigationBar.BACKGROUND_STYLE_STATIC)
|
||||||
|
|
||||||
|
if (fromTabShortcut) {
|
||||||
|
bottomBar.selectTab(elementsShown - 1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
@ -367,7 +382,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
thread {
|
thread {
|
||||||
if (response.body() != null) {
|
if (response.body() != null) {
|
||||||
val apiItems = (response.body() as ArrayList<Item>).filter {
|
val apiItems = (response.body() as ArrayList<Item>).filter {
|
||||||
maybeTagFilter != null || filter(it.tags)
|
maybeTagFilter != null || filter(it.tags.tags)
|
||||||
} as ArrayList<Item>
|
} as ArrayList<Item>
|
||||||
db.itemsDao().deleteAllItems()
|
db.itemsDao().deleteAllItems()
|
||||||
db.itemsDao()
|
db.itemsDao()
|
||||||
@ -628,14 +643,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
drawer.addItem(DividerDrawerItem())
|
|
||||||
drawer.addItem(
|
|
||||||
SecondaryDrawerItem()
|
|
||||||
.withName(getString(R.string.drawer_item_tags))
|
|
||||||
.withIdentifier(DRAWER_ID_TAGS)
|
|
||||||
.withSelectable(false)
|
|
||||||
)
|
|
||||||
handleTags(maybeDrawerData.tags)
|
|
||||||
if (hiddenTags.isNotEmpty()) {
|
if (hiddenTags.isNotEmpty()) {
|
||||||
drawer.addItem(DividerDrawerItem())
|
drawer.addItem(DividerDrawerItem())
|
||||||
drawer.addItem(
|
drawer.addItem(
|
||||||
@ -647,6 +654,14 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
handleHiddenTags(maybeDrawerData.tags)
|
handleHiddenTags(maybeDrawerData.tags)
|
||||||
}
|
}
|
||||||
drawer.addItem(DividerDrawerItem())
|
drawer.addItem(DividerDrawerItem())
|
||||||
|
drawer.addItem(
|
||||||
|
SecondaryDrawerItem()
|
||||||
|
.withName(getString(R.string.drawer_item_tags))
|
||||||
|
.withIdentifier(DRAWER_ID_TAGS)
|
||||||
|
.withSelectable(false)
|
||||||
|
)
|
||||||
|
handleTags(maybeDrawerData.tags)
|
||||||
|
drawer.addItem(DividerDrawerItem())
|
||||||
drawer.addItem(
|
drawer.addItem(
|
||||||
SecondaryDrawerItem()
|
SecondaryDrawerItem()
|
||||||
.withName(getString(R.string.drawer_item_sources))
|
.withName(getString(R.string.drawer_item_sources))
|
||||||
@ -721,7 +736,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
var sources: List<Source>?
|
var sources: List<Source>?
|
||||||
|
|
||||||
fun sourcesApiCall() {
|
fun sourcesApiCall() {
|
||||||
if (this@HomeActivity.isNetworkAccessible(null)) {
|
if (this@HomeActivity.isNetworkAccessible(null, offlineShortcut)) {
|
||||||
api.sources.enqueue(object : Callback<List<Source>> {
|
api.sources.enqueue(object : Callback<List<Source>> {
|
||||||
override fun onResponse(
|
override fun onResponse(
|
||||||
call: Call<List<Source>>?,
|
call: Call<List<Source>>?,
|
||||||
@ -735,12 +750,16 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onFailure(call: Call<List<Source>>?, t: Throwable?) {
|
override fun onFailure(call: Call<List<Source>>?, t: Throwable?) {
|
||||||
|
val apiDrawerData = DrawerData(tags, null)
|
||||||
|
if ((maybeDrawerData != null && maybeDrawerData != apiDrawerData) || maybeDrawerData == null) {
|
||||||
|
handleDrawerData(apiDrawerData)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this@HomeActivity.isNetworkAccessible(null)) {
|
if (this@HomeActivity.isNetworkAccessible(null, offlineShortcut)) {
|
||||||
api.tags.enqueue(object : Callback<List<Tag>> {
|
api.tags.enqueue(object : Callback<List<Tag>> {
|
||||||
override fun onResponse(
|
override fun onResponse(
|
||||||
call: Call<List<Tag>>,
|
call: Call<List<Tag>>,
|
||||||
@ -871,7 +890,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
else -> Unit
|
else -> Unit
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this@HomeActivity.isNetworkAccessible(this@HomeActivity.findViewById(R.id.coordLayout))) {
|
if (this@HomeActivity.isNetworkAccessible(this@HomeActivity.findViewById(R.id.coordLayout), offlineShortcut)) {
|
||||||
when (position) {
|
when (position) {
|
||||||
0 -> getUnRead()
|
0 -> getUnRead()
|
||||||
1 -> getRead()
|
1 -> getRead()
|
||||||
@ -968,7 +987,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
handleListResult()
|
handleListResult()
|
||||||
doGetAccordingToTab()
|
doGetAccordingToTab()
|
||||||
} else {
|
} else {
|
||||||
if (this@HomeActivity.isNetworkAccessible(this@HomeActivity.findViewById(R.id.coordLayout))) {
|
if (this@HomeActivity.isNetworkAccessible(this@HomeActivity.findViewById(R.id.coordLayout), offlineShortcut)) {
|
||||||
doGetAccordingToTab()
|
doGetAccordingToTab()
|
||||||
getAndStoreAllItems()
|
getAndStoreAllItems()
|
||||||
}
|
}
|
||||||
@ -999,7 +1018,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
getAndStoreAllItems()
|
getAndStoreAllItems()
|
||||||
items = response.body() as ArrayList<Item>
|
items = response.body() as ArrayList<Item>
|
||||||
items = items.filter {
|
items = items.filter {
|
||||||
maybeTagFilter != null || filter(it.tags)
|
maybeTagFilter != null || filter(it.tags.tags)
|
||||||
} as ArrayList<Item>
|
} as ArrayList<Item>
|
||||||
|
|
||||||
if (allItems.isEmpty()) {
|
if (allItems.isEmpty()) {
|
||||||
@ -1027,7 +1046,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
swipeRefreshLayout.post { swipeRefreshLayout.isRefreshing = true }
|
swipeRefreshLayout.post { swipeRefreshLayout.isRefreshing = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this@HomeActivity.isNetworkAccessible(this@HomeActivity.findViewById(R.id.coordLayout))) {
|
if (this@HomeActivity.isNetworkAccessible(this@HomeActivity.findViewById(R.id.coordLayout), offlineShortcut)) {
|
||||||
call(maybeTagFilter?.tag, maybeSourceFilter?.id?.toLong(), maybeSearchFilter)
|
call(maybeTagFilter?.tag, maybeSourceFilter?.id?.toLong(), maybeSearchFilter)
|
||||||
.enqueue(object : Callback<List<Item>> {
|
.enqueue(object : Callback<List<Item>> {
|
||||||
override fun onResponse(
|
override fun onResponse(
|
||||||
@ -1157,7 +1176,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun reloadBadges() {
|
private fun reloadBadges() {
|
||||||
if (this@HomeActivity.isNetworkAccessible(null) && (displayUnreadCount || displayAllCount)) {
|
if (this@HomeActivity.isNetworkAccessible(null, offlineShortcut) && (displayUnreadCount || displayAllCount)) {
|
||||||
api.stats.enqueue(object : Callback<Stats> {
|
api.stats.enqueue(object : Callback<Stats> {
|
||||||
override fun onResponse(call: Call<Stats>, response: Response<Stats>) {
|
override fun onResponse(call: Call<Stats>, response: Response<Stats>) {
|
||||||
if (response.body() != null) {
|
if (response.body() != null) {
|
||||||
@ -1263,7 +1282,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
R.id.refresh -> {
|
R.id.refresh -> {
|
||||||
if (this@HomeActivity.isNetworkAccessible(null)) {
|
if (this@HomeActivity.isNetworkAccessible(null, offlineShortcut)) {
|
||||||
needsConfirmation(R.string.menu_home_refresh, R.string.refresh_dialog_message) {
|
needsConfirmation(R.string.menu_home_refresh, R.string.refresh_dialog_message) {
|
||||||
api.update().enqueue(object : Callback<String> {
|
api.update().enqueue(object : Callback<String> {
|
||||||
override fun onResponse(
|
override fun onResponse(
|
||||||
@ -1299,7 +1318,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
val ids = allItems.map { it.id }
|
val ids = allItems.map { it.id }
|
||||||
val itemsByTag: Map<Long, Int> =
|
val itemsByTag: Map<Long, Int> =
|
||||||
allItems.flattenTags()
|
allItems.flattenTags()
|
||||||
.groupBy { it.tags.longHash() }
|
.groupBy { it.tags.tags.longHash() }
|
||||||
.map { it.key to it.value.size }
|
.map { it.key to it.value.size }
|
||||||
.toMap()
|
.toMap()
|
||||||
|
|
||||||
@ -1307,7 +1326,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
ACRA.getErrorReporter().maybeHandleSilentException(e, this@HomeActivity)
|
ACRA.getErrorReporter().maybeHandleSilentException(e, this@HomeActivity)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ids.isNotEmpty() && this@HomeActivity.isNetworkAccessible(null)) {
|
if (ids.isNotEmpty() && this@HomeActivity.isNetworkAccessible(null, offlineShortcut)) {
|
||||||
api.readAll(ids).enqueue(object : Callback<SuccessResponse> {
|
api.readAll(ids).enqueue(object : Callback<SuccessResponse> {
|
||||||
override fun onResponse(
|
override fun onResponse(
|
||||||
call: Call<SuccessResponse>,
|
call: Call<SuccessResponse>,
|
||||||
@ -1451,7 +1470,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this@HomeActivity.isNetworkAccessible(null)) {
|
if (this@HomeActivity.isNetworkAccessible(null, offlineShortcut)) {
|
||||||
thread {
|
thread {
|
||||||
val actions = db.actionsDao().actions()
|
val actions = db.actionsDao().actions()
|
||||||
|
|
||||||
|
@ -68,11 +68,18 @@ class MyApp : MultiDexApplication() {
|
|||||||
|
|
||||||
private fun handleNotificationChannels() {
|
private fun handleNotificationChannels() {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
val notificationManager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager
|
||||||
|
|
||||||
val name = getString(R.string.notification_channel_sync)
|
val name = getString(R.string.notification_channel_sync)
|
||||||
val importance = NotificationManager.IMPORTANCE_LOW
|
val importance = NotificationManager.IMPORTANCE_LOW
|
||||||
val mChannel = NotificationChannel(Config.syncChannelId, name, importance)
|
val mChannel = NotificationChannel(Config.syncChannelId, name, importance)
|
||||||
val notificationManager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager
|
|
||||||
|
val newItemsChannelname = getString(R.string.new_items_channel_sync)
|
||||||
|
val newItemsChannelimportance = NotificationManager.IMPORTANCE_DEFAULT
|
||||||
|
val newItemsChannelmChannel = NotificationChannel(Config.newItemsChannelId, newItemsChannelname, newItemsChannelimportance)
|
||||||
|
|
||||||
notificationManager.createNotificationChannel(mChannel)
|
notificationManager.createNotificationChannel(mChannel)
|
||||||
|
notificationManager.createNotificationChannel(newItemsChannelmChannel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ class SelfossApi(
|
|||||||
val gson =
|
val gson =
|
||||||
GsonBuilder()
|
GsonBuilder()
|
||||||
.registerTypeAdapter(Boolean::class.javaPrimitiveType, BooleanTypeAdapter())
|
.registerTypeAdapter(Boolean::class.javaPrimitiveType, BooleanTypeAdapter())
|
||||||
|
.registerTypeAdapter(SelfossTagType::class.java, SelfossTagTypeTypeAdapter())
|
||||||
.setLenient()
|
.setLenient()
|
||||||
.create()
|
.create()
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ data class Spout(
|
|||||||
data class Source(
|
data class Source(
|
||||||
@SerializedName("id") val id: String,
|
@SerializedName("id") val id: String,
|
||||||
@SerializedName("title") val title: String,
|
@SerializedName("title") val title: String,
|
||||||
@SerializedName("tags") val tags: String,
|
@SerializedName("tags") val tags: SelfossTagType,
|
||||||
@SerializedName("spout") val spout: String,
|
@SerializedName("spout") val spout: String,
|
||||||
@SerializedName("error") val error: String,
|
@SerializedName("error") val error: String,
|
||||||
@SerializedName("icon") val icon: String
|
@SerializedName("icon") val icon: String
|
||||||
@ -71,7 +71,7 @@ data class Item(
|
|||||||
@SerializedName("icon") val icon: String,
|
@SerializedName("icon") val icon: String,
|
||||||
@SerializedName("link") val link: String,
|
@SerializedName("link") val link: String,
|
||||||
@SerializedName("sourcetitle") val sourcetitle: String,
|
@SerializedName("sourcetitle") val sourcetitle: String,
|
||||||
@SerializedName("tags") val tags: String
|
@SerializedName("tags") val tags: SelfossTagType
|
||||||
) : Parcelable {
|
) : Parcelable {
|
||||||
|
|
||||||
var config: Config? = null
|
var config: Config? = null
|
||||||
@ -94,7 +94,7 @@ data class Item(
|
|||||||
icon = source.readString(),
|
icon = source.readString(),
|
||||||
link = source.readString(),
|
link = source.readString(),
|
||||||
sourcetitle = source.readString(),
|
sourcetitle = source.readString(),
|
||||||
tags = source.readString()
|
tags = source.readParcelable(ClassLoader.getSystemClassLoader())
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun describeContents() = 0
|
override fun describeContents() = 0
|
||||||
@ -110,7 +110,7 @@ data class Item(
|
|||||||
dest.writeString(icon)
|
dest.writeString(icon)
|
||||||
dest.writeString(link)
|
dest.writeString(link)
|
||||||
dest.writeString(sourcetitle)
|
dest.writeString(sourcetitle)
|
||||||
dest.writeString(tags)
|
dest.writeParcelable(tags, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getIcon(app: Context): String {
|
fun getIcon(app: Context): String {
|
||||||
@ -154,3 +154,26 @@ data class Item(
|
|||||||
return stringUrl
|
return stringUrl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data class SelfossTagType(val tags: String) : Parcelable {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@JvmField val CREATOR: Parcelable.Creator<SelfossTagType> =
|
||||||
|
object : Parcelable.Creator<SelfossTagType> {
|
||||||
|
override fun createFromParcel(source: Parcel): SelfossTagType =
|
||||||
|
SelfossTagType(source)
|
||||||
|
|
||||||
|
override fun newArray(size: Int): Array<SelfossTagType?> = arrayOfNulls(size)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(source: Parcel) : this(
|
||||||
|
tags = source.readString()
|
||||||
|
)
|
||||||
|
|
||||||
|
override fun describeContents() = 0
|
||||||
|
|
||||||
|
override fun writeToParcel(dest: Parcel, flags: Int) {
|
||||||
|
dest.writeString(tags)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package apps.amine.bou.readerforselfoss.api.selfoss
|
||||||
|
|
||||||
|
import com.google.gson.JsonDeserializationContext
|
||||||
|
import com.google.gson.JsonDeserializer
|
||||||
|
import com.google.gson.JsonElement
|
||||||
|
import com.google.gson.JsonParseException
|
||||||
|
import java.lang.reflect.Type
|
||||||
|
|
||||||
|
internal class SelfossTagTypeTypeAdapter : JsonDeserializer<SelfossTagType> {
|
||||||
|
|
||||||
|
@Throws(JsonParseException::class)
|
||||||
|
override fun deserialize(
|
||||||
|
json: JsonElement,
|
||||||
|
typeOfT: Type,
|
||||||
|
context: JsonDeserializationContext
|
||||||
|
): SelfossTagType? =
|
||||||
|
if (json.isJsonArray) {
|
||||||
|
SelfossTagType(json.asJsonArray.joinToString(",") { it.toString() })
|
||||||
|
} else {
|
||||||
|
SelfossTagType(json.toString())
|
||||||
|
}
|
||||||
|
}
|
@ -1,14 +1,17 @@
|
|||||||
package apps.amine.bou.readerforselfoss.background
|
package apps.amine.bou.readerforselfoss.background
|
||||||
|
|
||||||
import android.app.NotificationManager
|
import android.app.NotificationManager
|
||||||
|
import android.app.PendingIntent
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Handler
|
import android.content.Intent
|
||||||
import android.preference.PreferenceManager
|
import android.preference.PreferenceManager
|
||||||
import androidx.core.app.NotificationCompat
|
import androidx.core.app.NotificationCompat
|
||||||
|
import androidx.core.app.NotificationCompat.PRIORITY_DEFAULT
|
||||||
import androidx.core.app.NotificationCompat.PRIORITY_LOW
|
import androidx.core.app.NotificationCompat.PRIORITY_LOW
|
||||||
import androidx.room.Room
|
import androidx.room.Room
|
||||||
import androidx.work.Worker
|
import androidx.work.Worker
|
||||||
import androidx.work.WorkerParameters
|
import androidx.work.WorkerParameters
|
||||||
|
import apps.amine.bou.readerforselfoss.MainActivity
|
||||||
import apps.amine.bou.readerforselfoss.R
|
import apps.amine.bou.readerforselfoss.R
|
||||||
import apps.amine.bou.readerforselfoss.api.selfoss.Item
|
import apps.amine.bou.readerforselfoss.api.selfoss.Item
|
||||||
import apps.amine.bou.readerforselfoss.api.selfoss.SelfossApi
|
import apps.amine.bou.readerforselfoss.api.selfoss.SelfossApi
|
||||||
@ -51,6 +54,7 @@ class LoadingWorker(val context: Context, params: WorkerParameters) : Worker(con
|
|||||||
this.context.getSharedPreferences(Config.settingsName, Context.MODE_PRIVATE)
|
this.context.getSharedPreferences(Config.settingsName, Context.MODE_PRIVATE)
|
||||||
val sharedPref = PreferenceManager.getDefaultSharedPreferences(this.context)
|
val sharedPref = PreferenceManager.getDefaultSharedPreferences(this.context)
|
||||||
val shouldLogEverything = sharedPref.getBoolean("should_log_everything", false)
|
val shouldLogEverything = sharedPref.getBoolean("should_log_everything", false)
|
||||||
|
val notifyNewItems = sharedPref.getBoolean("notify_new_items", false)
|
||||||
|
|
||||||
db = Room.databaseBuilder(
|
db = Room.databaseBuilder(
|
||||||
applicationContext,
|
applicationContext,
|
||||||
@ -81,6 +85,28 @@ class LoadingWorker(val context: Context, params: WorkerParameters) : Worker(con
|
|||||||
db.itemsDao().deleteAllItems()
|
db.itemsDao().deleteAllItems()
|
||||||
db.itemsDao()
|
db.itemsDao()
|
||||||
.insertAllItems(*(apiItems.map { it.toEntity() }).toTypedArray())
|
.insertAllItems(*(apiItems.map { it.toEntity() }).toTypedArray())
|
||||||
|
|
||||||
|
val newSize = apiItems.filter { it.unread }.size
|
||||||
|
if (notifyNewItems && newSize > 0) {
|
||||||
|
|
||||||
|
val intent = Intent(context, MainActivity::class.java).apply {
|
||||||
|
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||||
|
}
|
||||||
|
val pendingIntent: PendingIntent = PendingIntent.getActivity(context, 0, intent, 0)
|
||||||
|
|
||||||
|
val newItemsNotification = NotificationCompat.Builder(applicationContext, Config.newItemsChannelId)
|
||||||
|
.setContentTitle(context.getString(R.string.new_items_notification_title))
|
||||||
|
.setContentText(context.getString(R.string.new_items_notification_text, newSize))
|
||||||
|
.setPriority(PRIORITY_DEFAULT)
|
||||||
|
.setChannelId(Config.newItemsChannelId)
|
||||||
|
.setContentIntent(pendingIntent)
|
||||||
|
.setAutoCancel(true)
|
||||||
|
.setSmallIcon(R.drawable.ic_fiber_new_black_24dp)
|
||||||
|
|
||||||
|
Timer("", false).schedule(4000) {
|
||||||
|
notificationManager.notify(2, newItemsNotification.build())
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Timer("", false).schedule(4000) {
|
Timer("", false).schedule(4000) {
|
||||||
notificationManager.cancel(1)
|
notificationManager.cancel(1)
|
||||||
|
@ -38,6 +38,8 @@ class Config(c: Context) {
|
|||||||
|
|
||||||
const val syncChannelId = "sync-channel-id"
|
const val syncChannelId = "sync-channel-id"
|
||||||
|
|
||||||
|
const val newItemsChannelId = "new-items-channel-id"
|
||||||
|
|
||||||
fun logoutAndRedirect(
|
fun logoutAndRedirect(
|
||||||
c: Context,
|
c: Context,
|
||||||
callingActivity: Activity,
|
callingActivity: Activity,
|
||||||
|
@ -3,6 +3,7 @@ package apps.amine.bou.readerforselfoss.utils
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.text.format.DateUtils
|
import android.text.format.DateUtils
|
||||||
import apps.amine.bou.readerforselfoss.api.selfoss.Item
|
import apps.amine.bou.readerforselfoss.api.selfoss.Item
|
||||||
|
import apps.amine.bou.readerforselfoss.api.selfoss.SelfossTagType
|
||||||
import org.acra.ACRA
|
import org.acra.ACRA
|
||||||
import java.text.ParseException
|
import java.text.ParseException
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
@ -44,8 +45,8 @@ fun Item.toggleStar(): Item {
|
|||||||
fun List<Item>.flattenTags(): List<Item> =
|
fun List<Item>.flattenTags(): List<Item> =
|
||||||
this.flatMap {
|
this.flatMap {
|
||||||
val item = it
|
val item = it
|
||||||
val tags: List<String> = it.tags.split(",")
|
val tags: List<String> = it.tags.tags.split(",")
|
||||||
tags.map {
|
tags.map { t ->
|
||||||
item.copy(tags = it.trim())
|
item.copy(tags = SelfossTagType(t.trim()))
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -11,15 +11,16 @@ import com.google.android.material.snackbar.Snackbar
|
|||||||
|
|
||||||
var snackBarShown = false
|
var snackBarShown = false
|
||||||
var view: View? = null
|
var view: View? = null
|
||||||
|
lateinit var s: Snackbar
|
||||||
|
|
||||||
fun Context.isNetworkAccessible(v: View?): Boolean {
|
fun Context.isNetworkAccessible(v: View?, overrideOffline: Boolean = false): Boolean {
|
||||||
val cm = this.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
|
val cm = this.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
|
||||||
val activeNetwork: NetworkInfo? = cm.activeNetworkInfo
|
val activeNetwork: NetworkInfo? = cm.activeNetworkInfo
|
||||||
val networkIsAccessible = activeNetwork != null && activeNetwork.isConnectedOrConnecting
|
val networkIsAccessible = activeNetwork != null && activeNetwork.isConnectedOrConnecting
|
||||||
|
|
||||||
if (v != null && !networkIsAccessible && (!snackBarShown || v != view)) {
|
if (v != null && (!networkIsAccessible || overrideOffline) && (!snackBarShown || v != view)) {
|
||||||
view = v
|
view = v
|
||||||
val s = Snackbar
|
s = Snackbar
|
||||||
.make(
|
.make(
|
||||||
v,
|
v,
|
||||||
R.string.no_network_connectivity,
|
R.string.no_network_connectivity,
|
||||||
@ -37,5 +38,8 @@ fun Context.isNetworkAccessible(v: View?): Boolean {
|
|||||||
s.show()
|
s.show()
|
||||||
snackBarShown = true
|
snackBarShown = true
|
||||||
}
|
}
|
||||||
return networkIsAccessible
|
if (snackBarShown && networkIsAccessible && !overrideOffline) {
|
||||||
|
s.dismiss()
|
||||||
|
}
|
||||||
|
return if(overrideOffline) overrideOffline else networkIsAccessible
|
||||||
}
|
}
|
@ -1,6 +1,7 @@
|
|||||||
package apps.amine.bou.readerforselfoss.utils.persistence
|
package apps.amine.bou.readerforselfoss.utils.persistence
|
||||||
|
|
||||||
import apps.amine.bou.readerforselfoss.api.selfoss.Item
|
import apps.amine.bou.readerforselfoss.api.selfoss.Item
|
||||||
|
import apps.amine.bou.readerforselfoss.api.selfoss.SelfossTagType
|
||||||
import apps.amine.bou.readerforselfoss.api.selfoss.Source
|
import apps.amine.bou.readerforselfoss.api.selfoss.Source
|
||||||
import apps.amine.bou.readerforselfoss.api.selfoss.Tag
|
import apps.amine.bou.readerforselfoss.api.selfoss.Tag
|
||||||
import apps.amine.bou.readerforselfoss.persistence.entities.ItemEntity
|
import apps.amine.bou.readerforselfoss.persistence.entities.ItemEntity
|
||||||
@ -18,7 +19,7 @@ fun SourceEntity.toView(): Source =
|
|||||||
Source(
|
Source(
|
||||||
this.id,
|
this.id,
|
||||||
this.title,
|
this.title,
|
||||||
this.tags,
|
SelfossTagType(this.tags),
|
||||||
this.spout,
|
this.spout,
|
||||||
this.error,
|
this.error,
|
||||||
this.icon
|
this.icon
|
||||||
@ -28,7 +29,7 @@ fun Source.toEntity(): SourceEntity =
|
|||||||
SourceEntity(
|
SourceEntity(
|
||||||
this.id,
|
this.id,
|
||||||
this.title,
|
this.title,
|
||||||
this.tags,
|
this.tags.tags,
|
||||||
this.spout,
|
this.spout,
|
||||||
this.error,
|
this.error,
|
||||||
this.icon.orEmpty()
|
this.icon.orEmpty()
|
||||||
@ -53,7 +54,7 @@ fun ItemEntity.toView(): Item =
|
|||||||
this.icon,
|
this.icon,
|
||||||
this.link,
|
this.link,
|
||||||
this.sourcetitle,
|
this.sourcetitle,
|
||||||
this.tags
|
SelfossTagType(this.tags)
|
||||||
)
|
)
|
||||||
|
|
||||||
fun Item.toEntity(): ItemEntity =
|
fun Item.toEntity(): ItemEntity =
|
||||||
@ -68,5 +69,5 @@ fun Item.toEntity(): ItemEntity =
|
|||||||
this.icon,
|
this.icon,
|
||||||
this.link,
|
this.link,
|
||||||
this.sourcetitle,
|
this.sourcetitle,
|
||||||
this.tags
|
this.tags.tags
|
||||||
)
|
)
|
@ -40,6 +40,5 @@
|
|||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"/>
|
||||||
app:layout_behavior="apps.amine.bou.readerforselfoss.utils.ScrollAwareFABBehavior" />
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -153,12 +153,17 @@
|
|||||||
<string name="pref_switch_items_caching_on">Los artículos se guardarán en la memoria del dispositivo y se utilizarán para el uso sin conexión.</string>
|
<string name="pref_switch_items_caching_on">Los artículos se guardarán en la memoria del dispositivo y se utilizarán para el uso sin conexión.</string>
|
||||||
<string name="pref_switch_items_caching">Guardar elementos para uso sin conexión</string>
|
<string name="pref_switch_items_caching">Guardar elementos para uso sin conexión</string>
|
||||||
<string name="no_network_connectivity">Sin conexión!</string>
|
<string name="no_network_connectivity">Sin conexión!</string>
|
||||||
<string name="pref_switch_periodic_refresh">Sync articles</string>
|
<string name="pref_switch_periodic_refresh">Sincronizar artículos</string>
|
||||||
<string name="pref_switch_periodic_refresh_off">Articles will not be synced in the background</string>
|
<string name="pref_switch_periodic_refresh_off">Los artículos no se sincronizarán en segundo plano</string>
|
||||||
<string name="pref_switch_periodic_refresh_on">Articles will periodically be synced</string>
|
<string name="pref_switch_periodic_refresh_on">Los artículos se sincronizarán periódicamente</string>
|
||||||
<string name="pref_periodic_refresh_minutes_title"><![CDATA[Sync interval ( >= 15 minutes)]]></string>
|
<string name="pref_periodic_refresh_minutes_title"><![CDATA[Intervalo de sincronización (>= 15 minutos)]]></string>
|
||||||
<string name="pref_switch_refresh_when_charging">Only refresh when phone is charging</string>
|
<string name="pref_switch_refresh_when_charging">Sólo refrescar cuando el teléfono está cargando</string>
|
||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Cargando...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss está sincronizando tus artículos</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Notificación de sincronización</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Chargement ...</string>
|
<string name="loading_notification_title">Chargement ...</string>
|
||||||
<string name="loading_notification_text">Selfoss synchronise vos articles</string>
|
<string name="loading_notification_text">Selfoss synchronise vos articles</string>
|
||||||
<string name="notification_channel_sync">Notification de synchronisation</string>
|
<string name="notification_channel_sync">Notification de synchronisation</string>
|
||||||
|
<string name="new_items_channel_sync">Notification de nouveaux articles</string>
|
||||||
|
<string name="new_items_notification_title">Nouveaux articles !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d nouveaux articles synchronisés.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notification quand des nouveaux articles sont synchronisés.</string>
|
||||||
|
<string name="shortcut_offline">Hors ligne</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -153,12 +153,17 @@
|
|||||||
<string name="pref_switch_items_caching_on">Os artigos gardaranse na memoria do dispositivo e estarán dispoñibles sen conexión.</string>
|
<string name="pref_switch_items_caching_on">Os artigos gardaranse na memoria do dispositivo e estarán dispoñibles sen conexión.</string>
|
||||||
<string name="pref_switch_items_caching">Gardar elementos para uso sen conexión</string>
|
<string name="pref_switch_items_caching">Gardar elementos para uso sen conexión</string>
|
||||||
<string name="no_network_connectivity">Non conectado!</string>
|
<string name="no_network_connectivity">Non conectado!</string>
|
||||||
<string name="pref_switch_periodic_refresh">Sync articles</string>
|
<string name="pref_switch_periodic_refresh">Sincronizar artigos</string>
|
||||||
<string name="pref_switch_periodic_refresh_off">Articles will not be synced in the background</string>
|
<string name="pref_switch_periodic_refresh_off">Os artigos non se sincronizarán coa aplicación de fondo</string>
|
||||||
<string name="pref_switch_periodic_refresh_on">Articles will periodically be synced</string>
|
<string name="pref_switch_periodic_refresh_on">Os artigos sincronizaranse periódicamente</string>
|
||||||
<string name="pref_periodic_refresh_minutes_title"><![CDATA[Sync interval ( >= 15 minutes)]]></string>
|
<string name="pref_periodic_refresh_minutes_title"><![CDATA[Intervalo de sincronización (>= 15 minutos)]]></string>
|
||||||
<string name="pref_switch_refresh_when_charging">Only refresh when phone is charging</string>
|
<string name="pref_switch_refresh_when_charging">Só refrescar cando o teléfono se está a cargar</string>
|
||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Cargando...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss está sincronizando os teus ar tigos</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Notificación de sincronización</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -137,13 +137,13 @@
|
|||||||
<string name="pref_switch_actions_pager_scroll">Mark as read on swipe</string>
|
<string name="pref_switch_actions_pager_scroll">Mark as read on swipe</string>
|
||||||
<string name="pref_switch_actions_pager_scroll_off">Don\'t mark articles as read when swiping.</string>
|
<string name="pref_switch_actions_pager_scroll_off">Don\'t mark articles as read when swiping.</string>
|
||||||
<string name="gdpr_dialog_message">The app does not collect any personal data. Every analytics tools were removed. Crash reports sending is now optional, as is the debug logging. Keep in mind that debugging and crash reports are essential for the app development (You can configure everything in Settings > Debug).</string>
|
<string name="gdpr_dialog_message">The app does not collect any personal data. Every analytics tools were removed. Crash reports sending is now optional, as is the debug logging. Keep in mind that debugging and crash reports are essential for the app development (You can configure everything in Settings > Debug).</string>
|
||||||
<string name="gdpr_dialog_title">The app does not share any personal data about you.</string>
|
<string name="gdpr_dialog_title">這應用程式不會分享你的任何個人資訊</string>
|
||||||
<string name="crash_dialog_text">Something went wrong. Please send the report to the developer.</string>
|
<string name="crash_dialog_text">Something went wrong. Please send the report to the developer.</string>
|
||||||
<string name="crash_dialog_comment">You can add any helpful details in the comment bellow. Don\'t include any personal data in your comment. You could send me and email with your debug id, and I\'ll keep you posted when the issue is resolved.</string>
|
<string name="crash_dialog_comment">You can add any helpful details in the comment bellow. Don\'t include any personal data in your comment. You could send me and email with your debug id, and I\'ll keep you posted when the issue is resolved.</string>
|
||||||
<string name="pref_acra_alwaysaccept">Automatically send crash reports</string>
|
<string name="pref_acra_alwaysaccept">自动发送錯誤报告</string>
|
||||||
<string name="pref_acra_alwaysaccept_enabled">Will send crash reports automatically</string>
|
<string name="pref_acra_alwaysaccept_enabled">Will send crash reports automatically</string>
|
||||||
<string name="pref_acra_alwaysaccept_disabled">Will ask everytime when sending crash reports.</string>
|
<string name="pref_acra_alwaysaccept_disabled">Will ask everytime when sending crash reports.</string>
|
||||||
<string name="pref_debug_crash_reports">Crash reports</string>
|
<string name="pref_debug_crash_reports">错误报告</string>
|
||||||
<string name="pref_debug_debug_logs">Debug logging (these will be sent without a dialog)</string>
|
<string name="pref_debug_debug_logs">Debug logging (these will be sent without a dialog)</string>
|
||||||
<string name="acra_login">Enable logging</string>
|
<string name="acra_login">Enable logging</string>
|
||||||
<string name="drawer_item_hidden_tags">Hidden Tags</string>
|
<string name="drawer_item_hidden_tags">Hidden Tags</string>
|
||||||
@ -152,13 +152,18 @@
|
|||||||
<string name="pref_switch_items_caching_off">Articles won\'t be saved to the device memory, and the app won\'t be usable offline.</string>
|
<string name="pref_switch_items_caching_off">Articles won\'t be saved to the device memory, and the app won\'t be usable offline.</string>
|
||||||
<string name="pref_switch_items_caching_on">Articles will be saved to the device memory and will be used for offline use.</string>
|
<string name="pref_switch_items_caching_on">Articles will be saved to the device memory and will be used for offline use.</string>
|
||||||
<string name="pref_switch_items_caching">Save items for offline use</string>
|
<string name="pref_switch_items_caching">Save items for offline use</string>
|
||||||
<string name="no_network_connectivity">Not connected !</string>
|
<string name="no_network_connectivity">未连接</string>
|
||||||
<string name="pref_switch_periodic_refresh">Sync articles</string>
|
<string name="pref_switch_periodic_refresh">Sync articles</string>
|
||||||
<string name="pref_switch_periodic_refresh_off">Articles will not be synced in the background</string>
|
<string name="pref_switch_periodic_refresh_off">Articles will not be synced in the background</string>
|
||||||
<string name="pref_switch_periodic_refresh_on">Articles will periodically be synced</string>
|
<string name="pref_switch_periodic_refresh_on">Articles will periodically be synced</string>
|
||||||
<string name="pref_periodic_refresh_minutes_title"><![CDATA[Sync interval ( >= 15 minutes)]]></string>
|
<string name="pref_periodic_refresh_minutes_title"><![CDATA[Sync interval ( >= 15 minutes)]]></string>
|
||||||
<string name="pref_switch_refresh_when_charging">Only refresh when phone is charging</string>
|
<string name="pref_switch_refresh_when_charging">Only refresh when phone is charging</string>
|
||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">加载中...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">同步通知</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,9 @@
|
|||||||
<string name="loading_notification_title">Loading ...</string>
|
<string name="loading_notification_title">Loading ...</string>
|
||||||
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
<string name="loading_notification_text">Selfoss is syncing your articles</string>
|
||||||
<string name="notification_channel_sync">Sync notification</string>
|
<string name="notification_channel_sync">Sync notification</string>
|
||||||
|
<string name="new_items_channel_sync">New items notification</string>
|
||||||
|
<string name="new_items_notification_title">New items !</string>
|
||||||
|
<string name="new_items_notification_text">%1$d new items loaded.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notify on new items synced.</string>
|
||||||
|
<string name="shortcut_offline">Offline</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
59
app/src/main/res/xml-v25/shortcuts.xml
Normal file
59
app/src/main/res/xml-v25/shortcuts.xml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<shortcut
|
||||||
|
android:shortcutId="new"
|
||||||
|
android:enabled="true"
|
||||||
|
android:icon="@drawable/ic_fiber_new_black_24dp"
|
||||||
|
android:shortcutShortLabel="@string/tab_new">
|
||||||
|
<intent
|
||||||
|
android:action="android.intent.action.VIEW"
|
||||||
|
android:targetPackage="apps.amine.bou.readerforselfoss"
|
||||||
|
android:targetClass="apps.amine.bou.readerforselfoss.HomeActivity">
|
||||||
|
<extra
|
||||||
|
android:name="shortcutTab"
|
||||||
|
android:value="1" />
|
||||||
|
</intent>
|
||||||
|
</shortcut>
|
||||||
|
<shortcut
|
||||||
|
android:shortcutId="read"
|
||||||
|
android:enabled="true"
|
||||||
|
android:icon="@drawable/ic_archive_black_24dp"
|
||||||
|
android:shortcutShortLabel="@string/tab_read">
|
||||||
|
<intent
|
||||||
|
android:action="android.intent.action.VIEW"
|
||||||
|
android:targetPackage="apps.amine.bou.readerforselfoss"
|
||||||
|
android:targetClass="apps.amine.bou.readerforselfoss.HomeActivity">
|
||||||
|
<extra
|
||||||
|
android:name="shortcutTab"
|
||||||
|
android:value="2" />
|
||||||
|
</intent>
|
||||||
|
</shortcut>
|
||||||
|
<shortcut
|
||||||
|
android:shortcutId="favs"
|
||||||
|
android:enabled="true"
|
||||||
|
android:icon="@drawable/ic_favorite_black_24dp"
|
||||||
|
android:shortcutShortLabel="@string/tab_favs">
|
||||||
|
<intent
|
||||||
|
android:action="android.intent.action.VIEW"
|
||||||
|
android:targetPackage="apps.amine.bou.readerforselfoss"
|
||||||
|
android:targetClass="apps.amine.bou.readerforselfoss.HomeActivity">
|
||||||
|
<extra
|
||||||
|
android:name="shortcutTab"
|
||||||
|
android:value="3" />
|
||||||
|
</intent>
|
||||||
|
</shortcut>
|
||||||
|
<shortcut
|
||||||
|
android:shortcutId="offline"
|
||||||
|
android:enabled="true"
|
||||||
|
android:icon="@drawable/ic_signal_wifi_statusbar_not_connected"
|
||||||
|
android:shortcutShortLabel="@string/shortcut_offline">
|
||||||
|
<intent
|
||||||
|
android:action="android.intent.action.VIEW"
|
||||||
|
android:targetPackage="apps.amine.bou.readerforselfoss"
|
||||||
|
android:targetClass="apps.amine.bou.readerforselfoss.HomeActivity">
|
||||||
|
<extra
|
||||||
|
android:name="startOffline"
|
||||||
|
android:value="true" />
|
||||||
|
</intent>
|
||||||
|
</shortcut>
|
||||||
|
</shortcuts>
|
@ -28,4 +28,10 @@
|
|||||||
android:key="refresh_when_charging"
|
android:key="refresh_when_charging"
|
||||||
android:dependency="periodic_refresh"
|
android:dependency="periodic_refresh"
|
||||||
android:title="@string/pref_switch_refresh_when_charging" />
|
android:title="@string/pref_switch_refresh_when_charging" />
|
||||||
|
|
||||||
|
<SwitchPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="notify_new_items"
|
||||||
|
android:dependency="periodic_refresh"
|
||||||
|
android:title="@string/pref_switch_notify_new_items" />
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
Reference in New Issue
Block a user