Hashtag timelines with multiple tags (#584)

* feat(api/hashtag): add any, all, and none parameter

* feat(timeline/hashtag): load with any, all and none parameter

* feat(timeline/hashtag): save any, all and none in timeline definition

* feat: set hastag parameter in UI

* feat: move strings to string res

* feat: show hint for tags

* refactor: use method for setting up tags text

* improve edit dialog, allow creating hashtag timelines

* add chips for hashtags

* add option for displaying only local posts in hashtag

* improve layout and wording

---------

Co-authored-by: sk <sk22@mailbox.org>
This commit is contained in:
FineFindus
2023-06-21 01:38:51 +02:00
committed by GitHub
parent bb4a52f03a
commit be425282a6
36 changed files with 3215 additions and 100 deletions

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="NachoTextView">
<attr name="chipHorizontalSpacing" format="reference|dimension" />
<attr name="chipBackground" format="reference|color"/>
<attr name="chipCornerRadius" format="reference|dimension"/>
<attr name="chipTextColor" format="reference|color"/>
<attr name="chipTextSize" format="reference|dimension"/>
<attr name="chipHeight" format="reference|dimension"/>
<attr name="chipVerticalSpacing" format="reference|dimension"/>
</declare-styleable>
</resources>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="chip_default_text_color">#DE000000</color>
<color name="chip_default_icon_background_color">#517FA4</color>
</resources>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="chip_default_padding_edge">12dp</dimen>
<dimen name="chip_default_padding_between_image">8dp</dimen>
<dimen name="chip_default_left_margin">0dp</dimen>
<dimen name="chip_default_right_margin">0dp</dimen>
</resources>

View File

@@ -0,0 +1,3 @@
<resources>
<string name="chip_ellipsis">&#8230;</string>
</resources>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="DefaultChipSuggestionTextView">
<item name="chipHorizontalSpacing">6dp</item>
<item name="chipBackground">@color/chip_material_background</item>
<item name="chipTextSize">14sp</item>
<item name="chipHeight">32dp</item>
<item name="chipVerticalSpacing">4dp</item>
</style>
</resources>

View File

@@ -229,7 +229,17 @@
<string name="sk_icon_pin">Pin</string>
<string name="sk_icon_feed">Feed</string>
<string name="sk_edit_timeline">Edit timeline</string>
<string name="sk_add_timeline">Add timeline</string>
<string name="sk_edit_timelines">Edit timelines</string>
<string name="sk_edit_timeline_tag_main">Posts containing hashtag…</string>
<string name="sk_edit_timeline_tag_any">…or any of these</string>
<string name="sk_edit_timeline_tag_all">…and every one of these</string>
<string name="sk_edit_timeline_tag_none">…but none of these</string>
<string name="sk_edit_timeline_tag_hint">Enter hashtag…</string>
<string name="sk_edit_timeline_tags_hint">Enter hashtags…</string>
<string name="sk_edit_timeline_tags_explanation">Please note that the server handles these operations. Combining them might not be supported.</string>
<string name="sk_hashtag_timeline_local_only_switch">Show only local posts?</string>
<string name="sk_add_timeline_tag_error_empty">Hashtag must not be empty</string>
<string name="sk_alt_button">ALT</string>
<string name="sk_post_edited">edited</string>
<string name="sk_notification_type_update">Edited posts</string>
@@ -309,4 +319,6 @@
<string name="sk_exclusive_list">Exclusive list</string>
<string name="sk_list_exclusive_switch">Make list exclusive</string>
<string name="sk_list_exclusive_switch_explanation">Members of an exclusive list will not show up on your home timeline if your instance supports it.</string>
<string name="sk_advanced_options_show">Show advanced options</string>
<string name="sk_advanced_options_hide">Hide advanced options</string>
</resources>