Bookmarks (#1560)
* add bookmarks to timelines * add Bookmarks to main menu * cleanup * handle BookmarkEvent * fix tests * fix bookmark handling in NotificationsFragment * add bookmark accessibility actions
This commit is contained in:
parent
d6ec5ca8d3
commit
d9694df0c2
44 changed files with 1235 additions and 122 deletions
9
app/src/main/res/drawable/ic_bookmark_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_bookmark_24dp.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="?android:attr/textColorTertiary"
|
||||
android:pathData="M17,3L7,3c-1.1,0 -1.99,0.9 -1.99,2L5,21l7,-3 7,3L19,5c0,-1.1 -0.9,-2 -2,-2zM17,18l-5,-2.18L7,18L7,5h10v13z"/>
|
||||
</vector>
|
9
app/src/main/res/drawable/ic_bookmark_active_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_bookmark_active_24dp.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#19a341"
|
||||
android:pathData="M17,3H7c-1.1,0 -1.99,0.9 -1.99,2L5,21l7,-3 7,3V5c0,-1.1 -0.9,-2 -2,-2z"/>
|
||||
</vector>
|
|
@ -5,7 +5,7 @@
|
|||
android:id="@+id/activity_view_thread"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.keylesspalace.tusky.FavouritesActivity">
|
||||
tools:context="com.keylesspalace.tusky.StatusListActivity">
|
||||
|
||||
<include layout="@layout/toolbar_basic" />
|
||||
|
|
@ -446,7 +446,7 @@
|
|||
android:clipToPadding="false"
|
||||
android:contentDescription="@string/action_favourite"
|
||||
android:padding="4dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_more"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_bookmark"
|
||||
app:layout_constraintStart_toEndOf="@id/status_reply"
|
||||
app:layout_constraintTop_toTopOf="@id/status_reply"
|
||||
sparkbutton:activeImage="?attr/status_favourite_active_drawable"
|
||||
|
@ -455,6 +455,23 @@
|
|||
sparkbutton:primaryColor="@color/tusky_orange"
|
||||
sparkbutton:secondaryColor="@color/tusky_orange_light" />
|
||||
|
||||
<at.connyduck.sparkbutton.SparkButton
|
||||
android:id="@+id/status_bookmark"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:clipToPadding="false"
|
||||
android:contentDescription="@string/action_bookmark"
|
||||
android:importantForAccessibility="no"
|
||||
android:padding="4dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_more"
|
||||
app:layout_constraintStart_toEndOf="@id/status_favourite"
|
||||
app:layout_constraintTop_toTopOf="@id/status_reply"
|
||||
sparkbutton:activeImage="@drawable/ic_bookmark_active_24dp"
|
||||
sparkbutton:iconSize="28dp"
|
||||
sparkbutton:inactiveImage="@drawable/ic_bookmark_24dp"
|
||||
sparkbutton:primaryColor="@color/tusky_green"
|
||||
sparkbutton:secondaryColor="@color/tusky_green_light" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/status_more"
|
||||
style="?attr/image_button_style"
|
||||
|
@ -465,7 +482,7 @@
|
|||
android:padding="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/status_reply"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/status_favourite"
|
||||
app:layout_constraintStart_toEndOf="@id/status_bookmark"
|
||||
app:layout_constraintTop_toTopOf="@id/status_reply"
|
||||
app:srcCompat="@drawable/ic_more_horiz_24dp" />
|
||||
|
||||
|
|
|
@ -451,7 +451,7 @@
|
|||
android:contentDescription="@string/action_favourite"
|
||||
android:importantForAccessibility="no"
|
||||
android:padding="4dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_more"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_bookmark"
|
||||
app:layout_constraintStart_toEndOf="@id/status_inset"
|
||||
app:layout_constraintTop_toTopOf="@id/status_inset"
|
||||
sparkbutton:activeImage="?attr/status_favourite_active_drawable"
|
||||
|
@ -460,6 +460,23 @@
|
|||
sparkbutton:primaryColor="@color/tusky_orange"
|
||||
sparkbutton:secondaryColor="@color/tusky_orange_light" />
|
||||
|
||||
<at.connyduck.sparkbutton.SparkButton
|
||||
android:id="@+id/status_bookmark"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:clipToPadding="false"
|
||||
android:contentDescription="@string/action_bookmark"
|
||||
android:importantForAccessibility="no"
|
||||
android:padding="4dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_more"
|
||||
app:layout_constraintStart_toEndOf="@id/status_favourite"
|
||||
app:layout_constraintTop_toTopOf="@id/status_reply"
|
||||
sparkbutton:activeImage="@drawable/ic_bookmark_active_24dp"
|
||||
sparkbutton:iconSize="28dp"
|
||||
sparkbutton:inactiveImage="@drawable/ic_bookmark_24dp"
|
||||
sparkbutton:primaryColor="@color/tusky_green"
|
||||
sparkbutton:secondaryColor="@color/tusky_green_light" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/status_more"
|
||||
style="?attr/image_button_style"
|
||||
|
@ -471,7 +488,7 @@
|
|||
android:padding="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/status_reply"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/status_favourite"
|
||||
app:layout_constraintStart_toEndOf="@id/status_bookmark"
|
||||
app:layout_constraintTop_toTopOf="@id/status_reply"
|
||||
app:srcCompat="@drawable/ic_more_horiz_24dp" />
|
||||
|
||||
|
|
|
@ -541,7 +541,7 @@
|
|||
android:contentDescription="@string/action_favourite"
|
||||
android:importantForAccessibility="no"
|
||||
android:padding="4dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_more"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_bookmark"
|
||||
app:layout_constraintStart_toEndOf="@id/status_inset"
|
||||
app:layout_constraintTop_toTopOf="@id/status_inset"
|
||||
sparkbutton:activeImage="?attr/status_favourite_active_drawable"
|
||||
|
@ -550,6 +550,23 @@
|
|||
sparkbutton:primaryColor="@color/tusky_orange"
|
||||
sparkbutton:secondaryColor="@color/tusky_orange_light" />
|
||||
|
||||
<at.connyduck.sparkbutton.SparkButton
|
||||
android:id="@+id/status_bookmark"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:clipToPadding="false"
|
||||
android:contentDescription="@string/action_bookmark"
|
||||
android:importantForAccessibility="no"
|
||||
android:padding="4dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_more"
|
||||
app:layout_constraintStart_toEndOf="@id/status_favourite"
|
||||
app:layout_constraintTop_toTopOf="@id/status_reply"
|
||||
sparkbutton:activeImage="@drawable/ic_bookmark_active_24dp"
|
||||
sparkbutton:iconSize="28dp"
|
||||
sparkbutton:inactiveImage="@drawable/ic_bookmark_24dp"
|
||||
sparkbutton:primaryColor="@color/tusky_green"
|
||||
sparkbutton:secondaryColor="@color/tusky_green_light" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/status_more"
|
||||
style="?attr/image_button_style"
|
||||
|
@ -560,7 +577,7 @@
|
|||
android:padding="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/status_reply"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/status_favourite"
|
||||
app:layout_constraintStart_toEndOf="@id/status_bookmark"
|
||||
app:layout_constraintTop_toTopOf="@id/status_reply"
|
||||
app:srcCompat="@drawable/ic_more_horiz_24dp" />
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
<item name="action_reply" type="id" />
|
||||
<item name="action_favourite" type="id" />
|
||||
<item name="action_unfavourite" type="id" />
|
||||
<item name="action_bookmark" type="id" />
|
||||
<item name="action_unbookmark" type="id" />
|
||||
<item name="action_reblog" type="id" />
|
||||
<item name="action_unreblog" type="id" />
|
||||
<item name="action_open_profile" type="id" />
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
<color name="tusky_blue_light">#56a7e1</color>
|
||||
<color name="tusky_orange">#ca8f04</color>
|
||||
<color name="tusky_orange_light">#fab207</color>
|
||||
<color name="tusky_green">#19a341</color>
|
||||
<color name="tusky_green_light">#25d069</color>
|
||||
|
||||
<color name="toolbar_view_media">#8f000000</color>
|
||||
<color name="header_background_filter">#44000000</color>
|
||||
|
|
|
@ -107,8 +107,8 @@
|
|||
|
||||
|
||||
<string name="description_status" translatable="false">
|
||||
<!-- Display name, cw?, content?, poll? relative date, reposted by?, reposted?, favorited?, username, media?; visibility, fav number?, reblog number?-->
|
||||
%1$s; %2$s; %3$s, %13$s %4$s, %5$s; %6$s, %7$s, %8$s, %9$s; %10$s, %11$s, %12$s
|
||||
<!-- Display name, cw?, content?, poll? relative date, reposted by?, reposted?, favorited?, bookmarked?, username, media?; visibility, fav number?, reblog number?-->
|
||||
%1$s; %2$s; %3$s, %14$s %4$s, %5$s; %6$s, %7$s, %8$s, %9$s, %10$s; %11$s, %12$s, %13$s
|
||||
</string>
|
||||
|
||||
<string-array name="rick_roll_domains" translatable="false">
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
<string name="title_follows">Follows</string>
|
||||
<string name="title_followers">Followers</string>
|
||||
<string name="title_favourites">Favorites</string>
|
||||
<string name="title_bookmarks">Bookmarks</string>
|
||||
<string name="title_mutes">Muted users</string>
|
||||
<string name="title_blocks">Blocked users</string>
|
||||
<string name="title_domain_mutes">Hidden domains</string>
|
||||
|
@ -67,6 +68,7 @@
|
|||
<string name="action_reblog">Boost</string>
|
||||
<string name="action_unreblog">Remove boost</string>
|
||||
<string name="action_favourite">Favorite</string>
|
||||
<string name="action_bookmark">Bookmark</string>
|
||||
<string name="action_unfavourite">Remove favorite</string>
|
||||
<string name="action_more">More</string>
|
||||
<string name="action_compose">Compose</string>
|
||||
|
@ -91,6 +93,7 @@
|
|||
<string name="action_view_preferences">Preferences</string>
|
||||
<string name="action_view_account_preferences">Account Preferences</string>
|
||||
<string name="action_view_favourites">Favorites</string>
|
||||
<string name="action_view_bookmarks">Bookmarks</string>
|
||||
<string name="action_view_mutes">Muted users</string>
|
||||
<string name="action_view_blocks">Blocked users</string>
|
||||
<string name="action_view_domain_mutes">Hidden domains</string>
|
||||
|
@ -443,6 +446,9 @@
|
|||
<string name="description_status_favourited">
|
||||
Favorited
|
||||
</string>
|
||||
<string name="description_status_bookmarked">
|
||||
Bookmarked
|
||||
</string>
|
||||
<string name="description_visiblity_public">
|
||||
Public
|
||||
</string>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue