Compare commits
30 Commits
v171811308
...
v171811321
Author | SHA1 | Date | |
---|---|---|---|
b59c3bcb23 | |||
7f554adba5 | |||
21ce061282 | |||
bdb71e9b14 | |||
df22e7de15 | |||
6b3550396b | |||
c70f1e31a6 | |||
695670e944 | |||
1028826788 | |||
82a8977c96 | |||
07d9ce1054 | |||
7da7d49277 | |||
9b45365441 | |||
91a7464bce | |||
51add226eb | |||
332e9f5108 | |||
0b91087c07 | |||
ebbb1ba0f8 | |||
e9143ae852 | |||
42e8ecee78 | |||
4efd76fcbc | |||
fb1614070e | |||
c473dd7227 | |||
76bddb195d | |||
1e02ad2041 | |||
f6ab909f8b | |||
7e520e9bed | |||
32e2d05014 | |||
40d9c97f73 | |||
1aa68d3449 |
@ -1,5 +1,13 @@
|
|||||||
**1.7.x**
|
**1.7.x**
|
||||||
|
|
||||||
|
- Added experimental issue to set a default timeout. Should work for #238.
|
||||||
|
|
||||||
|
- 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.
|
||||||
|
@ -10,8 +10,8 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def gitVersion() {
|
def gitVersion() {
|
||||||
def process = "git describe --abbrev=0 --tags".execute()
|
def process = "git for-each-ref refs/tags --sort=-taggerdate --format='%(refname:short)' --count=1".execute()
|
||||||
return process.text.substring(1).replaceAll("\\.", "").trim()
|
return process.text.replaceAll("'", "").substring(1).replaceAll("\\.", "").trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
def versionCodeFromGit() {
|
def versionCodeFromGit() {
|
||||||
@ -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"
|
||||||
|
@ -89,6 +89,7 @@ class AddSourceActivity : AppCompatActivity() {
|
|||||||
this,
|
this,
|
||||||
this@AddSourceActivity,
|
this@AddSourceActivity,
|
||||||
prefs.getBoolean("isSelfSignedCert", false),
|
prefs.getBoolean("isSelfSignedCert", false),
|
||||||
|
prefs.getString("api_timeout", "-1").toLong(),
|
||||||
prefs.getBoolean("should_log_everything", false)
|
prefs.getBoolean("should_log_everything", false)
|
||||||
)
|
)
|
||||||
} catch (e: IllegalArgumentException) {
|
} catch (e: IllegalArgumentException) {
|
||||||
|
@ -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()
|
||||||
@ -185,6 +195,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
this,
|
this,
|
||||||
this@HomeActivity,
|
this@HomeActivity,
|
||||||
settings.getBoolean("isSelfSignedCert", false),
|
settings.getBoolean("isSelfSignedCert", false),
|
||||||
|
sharedPref.getString("api_timeout", "-1").toLong(),
|
||||||
shouldLogEverything
|
shouldLogEverything
|
||||||
)
|
)
|
||||||
items = ArrayList()
|
items = ArrayList()
|
||||||
@ -203,6 +214,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 +260,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 +330,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 +383,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 +644,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 +655,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 +737,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 +751,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 +891,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 +988,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 +1019,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 +1047,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 +1177,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 +1283,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 +1319,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 +1327,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 +1471,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()
|
||||||
|
|
||||||
|
@ -195,6 +195,7 @@ class LoginActivity : AppCompatActivity() {
|
|||||||
this,
|
this,
|
||||||
this@LoginActivity,
|
this@LoginActivity,
|
||||||
isWithSelfSignedCert,
|
isWithSelfSignedCert,
|
||||||
|
-1L,
|
||||||
isWithSelfSignedCert
|
isWithSelfSignedCert
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,6 +95,7 @@ class ReaderActivity : AppCompatActivity() {
|
|||||||
this,
|
this,
|
||||||
this@ReaderActivity,
|
this@ReaderActivity,
|
||||||
prefs.getBoolean("isSelfSignedCert", false),
|
prefs.getBoolean("isSelfSignedCert", false),
|
||||||
|
prefs.getString("api_timeout", "-1").toLong(),
|
||||||
prefs.getBoolean("should_log_everything", false)
|
prefs.getBoolean("should_log_everything", false)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@ class SourcesActivity : AppCompatActivity() {
|
|||||||
this,
|
this,
|
||||||
this@SourcesActivity,
|
this@SourcesActivity,
|
||||||
prefs.getBoolean("isSelfSignedCert", false),
|
prefs.getBoolean("isSelfSignedCert", false),
|
||||||
|
prefs.getString("api_timeout", "-1").toLong(),
|
||||||
prefs.getBoolean("should_log_everything", false)
|
prefs.getBoolean("should_log_everything", false)
|
||||||
)
|
)
|
||||||
var items: ArrayList<Source> = ArrayList()
|
var items: ArrayList<Source> = ArrayList()
|
||||||
|
@ -179,7 +179,8 @@ class ItemCardAdapter(
|
|||||||
})
|
})
|
||||||
|
|
||||||
mView.shareBtn.setOnClickListener {
|
mView.shareBtn.setOnClickListener {
|
||||||
c.shareLink(items[adapterPosition].getLinkDecoded())
|
val item = items[adapterPosition]
|
||||||
|
c.shareLink(item.getLinkDecoded(), item.title)
|
||||||
}
|
}
|
||||||
|
|
||||||
mView.browserBtn.setOnClickListener {
|
mView.browserBtn.setOnClickListener {
|
||||||
|
@ -18,11 +18,13 @@ import retrofit2.Call
|
|||||||
import retrofit2.Retrofit
|
import retrofit2.Retrofit
|
||||||
import retrofit2.converter.gson.GsonConverterFactory
|
import retrofit2.converter.gson.GsonConverterFactory
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
class SelfossApi(
|
class SelfossApi(
|
||||||
c: Context,
|
c: Context,
|
||||||
callingActivity: Activity?,
|
callingActivity: Activity?,
|
||||||
isWithSelfSignedCert: Boolean,
|
isWithSelfSignedCert: Boolean,
|
||||||
|
timeout: Long,
|
||||||
shouldLog: Boolean
|
shouldLog: Boolean
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@ -38,16 +40,25 @@ class SelfossApi(
|
|||||||
this
|
this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun OkHttpClient.Builder.maybeWithSettingsTimeout(timeout: Long): OkHttpClient.Builder =
|
||||||
|
if (timeout != -1L) {
|
||||||
|
this.readTimeout(timeout, TimeUnit.SECONDS)
|
||||||
|
.connectTimeout(timeout, TimeUnit.SECONDS)
|
||||||
|
} else {
|
||||||
|
this
|
||||||
|
}
|
||||||
|
|
||||||
fun Credentials.createAuthenticator(): DispatchingAuthenticator =
|
fun Credentials.createAuthenticator(): DispatchingAuthenticator =
|
||||||
DispatchingAuthenticator.Builder()
|
DispatchingAuthenticator.Builder()
|
||||||
.with("digest", DigestAuthenticator(this))
|
.with("digest", DigestAuthenticator(this))
|
||||||
.with("basic", BasicAuthenticator(this))
|
.with("basic", BasicAuthenticator(this))
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
fun DispatchingAuthenticator.getHttpClien(isWithSelfSignedCert: Boolean): OkHttpClient.Builder {
|
fun DispatchingAuthenticator.getHttpClien(isWithSelfSignedCert: Boolean, timeout: Long): OkHttpClient.Builder {
|
||||||
val authCache = ConcurrentHashMap<String, CachingAuthenticator>()
|
val authCache = ConcurrentHashMap<String, CachingAuthenticator>()
|
||||||
return OkHttpClient
|
return OkHttpClient
|
||||||
.Builder()
|
.Builder()
|
||||||
|
.maybeWithSettingsTimeout(timeout)
|
||||||
.maybeWithSelfSigned(isWithSelfSignedCert)
|
.maybeWithSelfSigned(isWithSelfSignedCert)
|
||||||
.authenticator(CachingAuthenticatorDecorator(this, authCache))
|
.authenticator(CachingAuthenticatorDecorator(this, authCache))
|
||||||
.addInterceptor(AuthenticationCacheInterceptor(authCache))
|
.addInterceptor(AuthenticationCacheInterceptor(authCache))
|
||||||
@ -66,6 +77,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()
|
||||||
|
|
||||||
@ -77,7 +89,7 @@ class SelfossApi(
|
|||||||
HttpLoggingInterceptor.Level.NONE
|
HttpLoggingInterceptor.Level.NONE
|
||||||
}
|
}
|
||||||
|
|
||||||
val httpClient = authenticator.getHttpClien(isWithSelfSignedCert)
|
val httpClient = authenticator.getHttpClien(isWithSelfSignedCert, timeout)
|
||||||
|
|
||||||
httpClient.addInterceptor(logging)
|
httpClient.addInterceptor(logging)
|
||||||
|
|
||||||
|
@ -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 {
|
||||||
@ -153,4 +153,27 @@ 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
|
||||||
@ -50,7 +53,7 @@ class LoadingWorker(val context: Context, params: WorkerParameters) : Worker(con
|
|||||||
val settings =
|
val settings =
|
||||||
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 notifyNewItems = sharedPref.getBoolean("notify_new_items", false)
|
||||||
|
|
||||||
db = Room.databaseBuilder(
|
db = Room.databaseBuilder(
|
||||||
applicationContext,
|
applicationContext,
|
||||||
@ -61,7 +64,8 @@ class LoadingWorker(val context: Context, params: WorkerParameters) : Worker(con
|
|||||||
this.context,
|
this.context,
|
||||||
null,
|
null,
|
||||||
settings.getBoolean("isSelfSignedCert", false),
|
settings.getBoolean("isSelfSignedCert", false),
|
||||||
shouldLogEverything
|
sharedPref.getString("api_timeout", "-1").toLong(),
|
||||||
|
sharedPref.getBoolean("should_log_everything", false)
|
||||||
)
|
)
|
||||||
|
|
||||||
api.allItems().enqueue(object : Callback<List<Item>> {
|
api.allItems().enqueue(object : Callback<List<Item>> {
|
||||||
@ -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)
|
||||||
|
@ -114,6 +114,7 @@ class ArticleFragment : Fragment() {
|
|||||||
context!!,
|
context!!,
|
||||||
activity!!,
|
activity!!,
|
||||||
settings.getBoolean("isSelfSignedCert", false),
|
settings.getBoolean("isSelfSignedCert", false),
|
||||||
|
prefs.getString("api_timeout", "-1").toLong(),
|
||||||
prefs.getBoolean("should_log_everything", false)
|
prefs.getBoolean("should_log_everything", false)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -138,7 +139,7 @@ class ArticleFragment : Fragment() {
|
|||||||
override fun onItemClick(item: MenuItem) {
|
override fun onItemClick(item: MenuItem) {
|
||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
R.id.more_action -> getContentFromMercury(customTabsIntent, prefs)
|
R.id.more_action -> getContentFromMercury(customTabsIntent, prefs)
|
||||||
R.id.share_action -> activity!!.shareLink(url)
|
R.id.share_action -> activity!!.shareLink(url, contentTitle)
|
||||||
R.id.open_action -> activity!!.openItemUrl(
|
R.id.open_action -> activity!!.openItemUrl(
|
||||||
allItems,
|
allItems,
|
||||||
pageNumber.toInt(),
|
pageNumber.toInt(),
|
||||||
|
@ -136,6 +136,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
|
|||||||
|| GeneralPreferenceFragment.class.getName().equals(fragmentName)
|
|| GeneralPreferenceFragment.class.getName().equals(fragmentName)
|
||||||
|| ArticleViewerPreferenceFragment.class.getName().equals(fragmentName)
|
|| ArticleViewerPreferenceFragment.class.getName().equals(fragmentName)
|
||||||
|| OfflinePreferenceFragment.class.getName().equals(fragmentName)
|
|| OfflinePreferenceFragment.class.getName().equals(fragmentName)
|
||||||
|
|| ExperimentalPreferenceFragment.class.getName().equals(fragmentName)
|
||||||
|| DebugPreferenceFragment.class.getName().equals(fragmentName)
|
|| DebugPreferenceFragment.class.getName().equals(fragmentName)
|
||||||
|| LinksPreferenceFragment.class.getName().equals(fragmentName)
|
|| LinksPreferenceFragment.class.getName().equals(fragmentName)
|
||||||
|| ThemePreferenceFragment.class.getName().equals(fragmentName);
|
|| ThemePreferenceFragment.class.getName().equals(fragmentName);
|
||||||
@ -384,6 +385,26 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
||||||
|
public static class ExperimentalPreferenceFragment extends PreferenceFragment {
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
addPreferencesFromResource(R.xml.pref_experimental);
|
||||||
|
setHasOptionsMenu(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
int id = item.getItemId();
|
||||||
|
if (id == android.R.id.home) {
|
||||||
|
getActivity().finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
@ -25,11 +25,12 @@ fun String.toStringUriWithHttp(): String =
|
|||||||
this
|
this
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.shareLink(itemUrl: String) {
|
fun Context.shareLink(itemUrl: String, itemTitle: String) {
|
||||||
val sendIntent = Intent()
|
val sendIntent = Intent()
|
||||||
sendIntent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
sendIntent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||||
sendIntent.action = Intent.ACTION_SEND
|
sendIntent.action = Intent.ACTION_SEND
|
||||||
sendIntent.putExtra(Intent.EXTRA_TEXT, itemUrl.toStringUriWithHttp())
|
sendIntent.putExtra(Intent.EXTRA_TEXT, itemUrl.toStringUriWithHttp())
|
||||||
|
sendIntent.putExtra(Intent.EXTRA_SUBJECT, itemTitle)
|
||||||
sendIntent.type = "text/plain"
|
sendIntent.type = "text/plain"
|
||||||
startActivity(
|
startActivity(
|
||||||
Intent.createChooser(
|
Intent.createChooser(
|
||||||
|
@ -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
|
||||||
)
|
)
|
BIN
app/src/main/res/drawable-hdpi/ic_action_lab.png
Normal file
BIN
app/src/main/res/drawable-hdpi/ic_action_lab.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 683 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_lab.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_action_lab.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 409 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_lab.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_action_lab.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 871 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_lab.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_action_lab.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_action_lab.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/ic_action_lab.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
@ -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,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -153,12 +153,19 @@
|
|||||||
<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">Notificación de elementos nuevos</string>
|
||||||
|
<string name="new_items_notification_title">¡Nuevos artículos!</string>
|
||||||
|
<string name="new_items_notification_text">%1$d artículos cargados.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notificarme cuando se sincronicen nuevos artículos.</string>
|
||||||
|
<string name="shortcut_offline">Sin conexión</string>
|
||||||
|
<string name="pref_api_timeout">Se acabó el tiempo de espera de la API</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -153,12 +153,19 @@
|
|||||||
<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">Notificación de actualizacións</string>
|
||||||
|
<string name="new_items_notification_title">Novo(s) elemento(s)!</string>
|
||||||
|
<string name="new_items_notification_text">%1$d novos elementos cargados.</string>
|
||||||
|
<string name="pref_switch_notify_new_items">Notificarme cando se sincronicen novos elementos.</string>
|
||||||
|
<string name="shortcut_offline">Sen conexión</string>
|
||||||
|
<string name="pref_api_timeout">Acabouse o tempo de espera da API</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</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,20 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -161,4 +161,11 @@
|
|||||||
<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>
|
||||||
|
<string name="pref_api_timeout">Api Timeout</string>
|
||||||
|
<string name="pref_header_experimental">Experimental</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>
|
9
app/src/main/res/xml/pref_experimental.xml
Normal file
9
app/src/main/res/xml/pref_experimental.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<EditTextPreference
|
||||||
|
android:inputType="number"
|
||||||
|
android:key="api_timeout"
|
||||||
|
android:selectAllOnFocus="true"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:title="@string/pref_api_timeout" />
|
||||||
|
|
||||||
|
</PreferenceScreen>
|
@ -32,4 +32,9 @@
|
|||||||
android:icon="@drawable/ic_info_black_24"
|
android:icon="@drawable/ic_info_black_24"
|
||||||
android:title="@string/pref_header_links"/>
|
android:title="@string/pref_header_links"/>
|
||||||
|
|
||||||
|
<header
|
||||||
|
android:fragment="apps.amine.bou.readerforselfoss.settings.SettingsActivity$ExperimentalPreferenceFragment"
|
||||||
|
android:icon="@drawable/ic_action_lab"
|
||||||
|
android:title="@string/pref_header_experimental"/>
|
||||||
|
|
||||||
</preference-headers>
|
</preference-headers>
|
||||||
|
@ -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>
|
||||||
|
24
build.sh
24
build.sh
@ -1,15 +1,31 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
git fetch --tags -p
|
||||||
|
|
||||||
BASE_VERSION="1.7"
|
BASE_VERSION="1.7"
|
||||||
TODAYS_VERSION="1"
|
LAST_TAG=$(git tag -l | sort -V | tail -1)
|
||||||
|
|
||||||
VERSION="${BASE_VERSION//./}$(date '+%y%m%j')$TODAYS_VERSION"
|
INITIAL_VERSION="${BASE_VERSION//./}$(date '+%y%m%j')"
|
||||||
|
|
||||||
./version.sh ${VERSION} $1
|
LAST_DAY_VERSION=$(echo $LAST_TAG | sed "s/v${INITIAL_VERSION}//")
|
||||||
|
LAST_DAY_VERSION_LENGTH=$(echo "${#LAST_DAY_VERSION}")
|
||||||
|
|
||||||
|
if [[ "$LAST_DAY_VERSION_LENGTH" == "1" ]]
|
||||||
|
then
|
||||||
|
TODAYS_VERSION=$(( $LAST_DAY_VERSION + 1 ))
|
||||||
|
else
|
||||||
|
TODAYS_VERSION="1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
VERSION="${INITIAL_VERSION}${TODAYS_VERSION}"
|
||||||
|
|
||||||
|
PARAMS_EXCEPT_PUBLISH=$(echo $1 | sed 's/\-\-publish//')
|
||||||
|
|
||||||
|
./version.sh ${VERSION} ${PARAMS_EXCEPT_PUBLISH}
|
||||||
|
|
||||||
if [[ "$@" == *'--publish'* ]]
|
if [[ "$@" == *'--publish'* ]]
|
||||||
then
|
then
|
||||||
./publish-version.sh ${VERSION}
|
./publish-version.sh ${VERSION}
|
||||||
else
|
else
|
||||||
echo "Did not publish. If you wanted to do so, call the script with \"--publish\"."
|
echo "Did not publish. If you wanted to do so, call the script with \"--publish\" or \"--publish-local\"."
|
||||||
fi
|
fi
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# NOTE: This is copy/pasted in jenkins
|
||||||
|
|
||||||
rm -f version.txt
|
rm -f version.txt
|
||||||
printf "versionName=$1-github\nversionCode=$1" >> version.txt
|
printf "versionName=$1-github\nversionCode=$1" >> version.txt
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user