Compare commits

..

5 Commits

Author SHA1 Message Date
24ae115ed4 New translations strings.xml (French) (#95) 2017-11-01 19:54:56 +01:00
7f345558cd Changelog. 2017-11-01 19:48:06 +01:00
57177cc910 Loading more on swipe. 2017-11-01 19:46:13 +01:00
cea258bc21 Fixes #45. User may need to reselect the theme. 2017-11-01 19:06:36 +01:00
ed9b1c8ba7 Only reporting the issue if there is an issue. 2017-11-01 18:13:54 +01:00
12 changed files with 75 additions and 15 deletions

View File

@ -1,3 +1,11 @@
**1.5.4.06**
- Loading more items on swipe too.
- Fixed popup menu style. User may need to reselect the theme.
- Disabled reporting marking items as read if there isn't an issue.
**1.5.4.05**
- Translation fix.

View File

@ -207,6 +207,18 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
else
tabNewBadge.hide()
val manager = recyclerView.layoutManager
val lastVisibleItem: Int = when (manager) {
is StaggeredGridLayoutManager -> manager.findLastCompletelyVisibleItemPositions(null).last()
is GridLayoutManager -> manager.findLastCompletelyVisibleItemPosition()
else -> 0
}
if (lastVisibleItem == (items.size - 1)) {
getElementsAccordingToTab(appendResults = true)
}
} catch (e: IndexOutOfBoundsException) {}
}

View File

@ -125,7 +125,7 @@ class ItemCardAdapter(private val app: Activity,
api.markItem(i.id).enqueue(object : Callback<SuccessResponse> {
override fun onResponse(call: Call<SuccessResponse>, response: Response<SuccessResponse>) {
if (debugReadingItems) {
if (!response.succeeded() && debugReadingItems) {
val message =
"message: ${response.message()} " +
"response isSuccess: ${response.isSuccessful} " +

View File

@ -138,7 +138,7 @@ class ItemListAdapter(private val app: Activity,
api.markItem(i.id).enqueue(object : Callback<SuccessResponse> {
override fun onResponse(call: Call<SuccessResponse>, response: Response<SuccessResponse>) {
if (debugReadingItems) {
if (!response.succeeded() && debugReadingItems) {
val message =
"message: ${response.message()} " +
"response isSuccess: ${response.isSuccessful} " +

View File

@ -0,0 +1,7 @@
package apps.amine.bou.readerforselfoss.utils
import apps.amine.bou.readerforselfoss.api.selfoss.SuccessResponse
import retrofit2.Response
fun Response<SuccessResponse>.succeeded(): Boolean =
this.code() === 200 && this.body() != null && this.body()!!.isSuccess

View File

@ -15,7 +15,8 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:theme="@style/ToolBarStyle" />
app:theme="@style/ToolBarStyle"
app:popupTheme="?attr/toolbarPopupTheme" />
</android.support.design.widget.AppBarLayout>

View File

@ -54,7 +54,8 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:theme="@style/ToolBarStyle" />
app:theme="@style/ToolBarStyle"
app:popupTheme="?attr/toolbarPopupTheme" />
</android.support.design.widget.AppBarLayout>

View File

@ -14,7 +14,8 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:theme="@style/ToolBarStyle" />
app:theme="@style/ToolBarStyle"
app:popupTheme="?attr/toolbarPopupTheme" />
</android.support.design.widget.AppBarLayout>
<LinearLayout

View File

@ -16,7 +16,8 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:theme="@style/ToolBarStyle" />
app:theme="@style/ToolBarStyle"
app:popupTheme="?attr/toolbarPopupTheme" />
</android.support.design.widget.AppBarLayout>

View File

@ -9,6 +9,7 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:theme="@style/ToolBarStyle" />
app:theme="@style/ToolBarStyle"
app:popupTheme="?attr/toolbarPopupTheme" />
</android.support.design.widget.AppBarLayout>

View File

@ -6,20 +6,20 @@
<string name="prompt_password">"Mot de passe"</string>
<string name="prompt_http_password">"Mot de passe HTTP"</string>
<string name="action_sign_in">"Valider"</string>
<string name="error_invalid_password">"Mot de passe pas assez lent"</string>
<string name="error_invalid_password">"Mot de passe trop court"</string>
<string name="error_field_required">"Champ requis"</string>
<string name="prompt_url">"Url Selfoss"</string>
<string name="withLoginSwitch">"Avec login ?"</string>
<string name="withHttpLoginSwitch">"Avec login HTTP ?"</string>
<string name="login_url_problem">"Petit soucis. Il manque peut être un / à la fin ?"</string>
<string name="login_url_problem">"Petit souci. Il manque peut être un / à la fin ?"</string>
<string name="prompt_login">"Utilisateur"</string>
<string name="prompt_http_login">"Utilisateur HTTP"</string>
<string name="label_share">"Partager"</string>
<string name="readAll">"Tout lire"</string>
<string name="action_disconnect">"Déconnecter"</string>
<string name="title_activity_settings">"Paramètres"</string>
<string name="pref_header_general">"General"</string>
<string name="pref_switch_actions_tap_title">"Action du clique sur un article"</string>
<string name="pref_header_general">"Général"</string>
<string name="pref_switch_actions_tap_title">"Action du clic sur un article"</string>
<string name="add_source_hint_tags">"Tag1, Tag2, Tag3"</string>
<string name="add_source_hint_url">"Lien"</string>
<string name="add_source_hint_name">"Nom"</string>
@ -101,14 +101,14 @@
<string name="card_height_on">La taille de la carte s\'adaptera au contenu</string>
<string name="card_height_off">La taille de la carte sera fixe</string>
<string name="source_code">Code source</string>
<string name="cant_mark_read">Kan het artikel niet als gelezen markeren</string>
<string name="cant_mark_read">Impossible de marquer l\'article comme lu</string>
<string name="drawer_error_loading_tags">Erreur lors du chargement des tags…</string>
<string name="drawer_error_loading_sources">Erreur lors du chargement des sources…</string>
<string name="drawer_item_filters">Filtres</string>
<string name="drawer_action_clear">raz</string>
<string name="drawer_item_tags">Tags</string>
<string name="drawer_item_sources">Sources</string>
<string name="drawer_action_edit">editer</string>
<string name="drawer_action_edit">éditer</string>
<string name="cache_drawer_error" tools:keep="@string/cache_drawer_error">Impossible de mettre en cache les filtres pour le drawer</string>
<string name="no_tags_loaded">Pas de tags chargés</string>
<string name="no_sources_loaded">Pas de sources chargés</string>
@ -132,7 +132,7 @@
<string name="indigo_pink_dark_theme">Indigo/Rose/Foncé</string>
<string name="red_teal_dark_theme">Rouge/Sarcelle/Foncé</string>
<string name="pref_header_debug">Debug</string>
<string name="login_debug_title">Activez pour loguer toutes les erreurs de conexion</string>
<string name="login_debug_title">Activez pour logguer toutes les erreurs de connexion</string>
<string name="login_debug_on">Toutes les erreurs de connexion vont être loguées</string>
<string name="login_debug_off">Aucune erreur de connexion ne sera loguée</string>
<string name="login_menu_debug">Debug</string>
@ -142,7 +142,7 @@
<string name="pref_api_items_number_title">Nombre d\'articles chargés</string>
<string name="read_debug_title">Des articles lus marqués comme non lus ?</string>
<string name="read_debug_off">Aucun log quand un article est marqué comme lu</string>
<string name="read_debug_on">Les appels API vont être logués lorsequ\'un article est marqué comme lu</string>
<string name="read_debug_on">Les appels API vont être logués lorsqu\'un article est marqué comme lu</string>
<string name="summary_debug_identifier">Identifiant de debug</string>
<string name="unique_id_to_clipboard">Texte copié</string>
<string name="display_header_drawer_summary">Afficher une entête avec l\'url de votre instance de Selfoss en haut du drawer lateral.</string>

View File

@ -14,6 +14,8 @@
<item name="android:textColorPrimary">@color/md_grey_900</item>
<item name="android:textColorSecondary">@color/md_grey_400</item>
<item name="material_drawer_header_selection_text">@color/md_grey_900</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Light</item>
</style>
<style name="NoBarDark" parent="MaterialDrawerTheme">
@ -27,6 +29,8 @@
<item name="android:textColorPrimary">@color/md_white_1000</item>
<item name="android:textColorSecondary">@color/md_grey_600</item>
<item name="material_drawer_header_selection_text">@color/md_grey_900</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
</style>
<!-- ToolBar -->
@ -50,6 +54,8 @@
<item name="android:textColorPrimary">@color/md_grey_900</item>
<item name="android:textColorSecondary">@color/md_grey_400</item>
<item name="material_drawer_header_selection_text">@color/md_grey_900</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Light</item>
</style>
<style name="NoBarBlueAmberDark" parent="MaterialDrawerTheme">
@ -63,6 +69,8 @@
<item name="android:textColorPrimary">@color/md_white_1000</item>
<item name="android:textColorSecondary">@color/md_grey_600</item>
<item name="material_drawer_header_selection_text">@color/md_grey_900</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
</style>
<style name="NoBarGreyOrange" parent="MaterialDrawerTheme.Light">
@ -75,6 +83,8 @@
<item name="android:textColorPrimary">@color/md_grey_900</item>
<item name="android:textColorSecondary">@color/md_grey_400</item>
<item name="material_drawer_header_selection_text">@color/md_grey_900</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Light</item>
</style>
<style name="NoBarGreyOrangeDark" parent="MaterialDrawerTheme">
@ -88,6 +98,8 @@
<item name="android:textColorPrimary">@color/md_white_1000</item>
<item name="android:textColorSecondary">@color/md_grey_600</item>
<item name="material_drawer_header_selection_text">@color/md_grey_900</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
</style>
<style name="NoBarIndigoPink" parent="MaterialDrawerTheme.Light">
@ -100,6 +112,8 @@
<item name="android:textColorPrimary">@color/md_grey_900</item>
<item name="android:textColorSecondary">@color/md_grey_400</item>
<item name="material_drawer_header_selection_text">@color/md_grey_900</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Light</item>
</style>
<style name="NoBarIndigoPinkDark" parent="MaterialDrawerTheme">
@ -113,6 +127,8 @@
<item name="android:textColorPrimary">@color/md_white_1000</item>
<item name="android:textColorSecondary">@color/md_grey_600</item>
<item name="material_drawer_header_selection_text">@color/md_grey_900</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
</style>
<style name="NoBarRedTeal" parent="MaterialDrawerTheme.Light">
@ -125,6 +141,8 @@
<item name="android:textColorPrimary">@color/md_grey_900</item>
<item name="android:textColorSecondary">@color/md_grey_400</item>
<item name="material_drawer_header_selection_text">@color/md_grey_900</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Light</item>
</style>
<style name="NoBarRedTealDark" parent="MaterialDrawerTheme">
@ -138,6 +156,8 @@
<item name="android:textColorPrimary">@color/md_white_1000</item>
<item name="android:textColorSecondary">@color/md_grey_600</item>
<item name="material_drawer_header_selection_text">@color/md_grey_900</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
</style>
<style name="NoBarCyanPink" parent="MaterialDrawerTheme.Light">
@ -150,6 +170,8 @@
<item name="android:textColorPrimary">@color/md_grey_900</item>
<item name="android:textColorSecondary">@color/md_grey_400</item>
<item name="material_drawer_header_selection_text">@color/md_grey_900</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Light</item>
</style>
<style name="NoBarCyanPinkDark" parent="MaterialDrawerTheme">
@ -163,6 +185,8 @@
<item name="android:textColorPrimary">@color/md_white_1000</item>
<item name="android:textColorSecondary">@color/md_grey_600</item>
<item name="material_drawer_header_selection_text">@color/md_grey_900</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
</style>
@ -176,6 +200,8 @@
<item name="android:textColorPrimary">@color/md_grey_900</item>
<item name="android:textColorSecondary">@color/md_grey_400</item>
<item name="material_drawer_header_selection_text">@color/md_grey_900</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Light</item>
</style>
<style name="NoBarTealOrangeDark" parent="MaterialDrawerTheme">
@ -189,6 +215,8 @@
<item name="android:textColorPrimary">@color/md_white_1000</item>
<item name="android:textColorSecondary">@color/md_grey_600</item>
<item name="material_drawer_header_selection_text">@color/md_grey_900</item>
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
</style>
<style name="Theme.App.Light" parent="Theme.IssueReporter.Light.DarkActionBar">