Browse Source

Prepare release 129 (#4880)

Let's get those three fixes out. 
#4864 is the important one.
pull/4882/head v27.2
Konrad Pozniak 1 year ago committed by GitHub
parent
commit
280f2f0a01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      CHANGELOG.md
  2. 4
      app/build.gradle
  3. 2
      app/src/main/java/com/keylesspalace/tusky/AccountsInListFragment.kt
  4. 5
      app/src/main/java/com/keylesspalace/tusky/MainActivity.kt
  5. 42
      app/src/main/java/com/keylesspalace/tusky/components/notifications/NotificationsViewModel.kt
  6. 38
      app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/CachedTimelineViewModel.kt
  7. 11
      app/src/main/res/drawable/dialog_background.xml
  8. 20
      app/src/main/res/values/styles.xml
  9. BIN
      fastlane/metadata/android/en-US/images/phoneScreenshots/01_timeline.png
  10. BIN
      fastlane/metadata/android/en-US/images/phoneScreenshots/03_profile.png

8
CHANGELOG.md

@ -6,6 +6,14 @@
### Significant bug fixes ### Significant bug fixes
## v27.2
### Significant bug fixes
- The title of a hashtag tab now shows the actual hashtags again (instead of just "Hashtags") https://github.com/tuskyapp/Tusky/pull/4868
- Makes sure the background color of a dialogs is correct https://github.com/tuskyapp/Tusky/pull/4864
- Fixes an issue where Tusky would freeze while loading a timeline gap https://github.com/tuskyapp/Tusky/pull/4865
## v27.1 ## v27.1
### New features and other improvements ### New features and other improvements

4
app/build.gradle

@ -29,8 +29,8 @@ android {
namespace "com.keylesspalace.tusky" namespace "com.keylesspalace.tusky"
minSdk 24 minSdk 24
targetSdk 34 targetSdk 34
versionCode 128 versionCode 129
versionName "27.1" versionName "27.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true

2
app/src/main/java/com/keylesspalace/tusky/AccountsInListFragment.kt

@ -75,7 +75,7 @@ class AccountsInListFragment : DialogFragment() {
viewModel.load(listId) viewModel.load(listId)
} }
override fun getTheme() = R.style.TuskyDialogOverlay override fun getTheme() = R.style.TuskyDialogFragment
override fun onStart() { override fun onStart() {
super.onStart() super.onStart()

5
app/src/main/java/com/keylesspalace/tusky/MainActivity.kt

@ -886,10 +886,7 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvider {
tabLayoutMediator = TabLayoutMediator(activeTabLayout, binding.viewPager, true) { tabLayoutMediator = TabLayoutMediator(activeTabLayout, binding.viewPager, true) {
tab: TabLayout.Tab, position: Int -> tab: TabLayout.Tab, position: Int ->
tab.icon = AppCompatResources.getDrawable(this@MainActivity, tabs[position].icon) tab.icon = AppCompatResources.getDrawable(this@MainActivity, tabs[position].icon)
tab.contentDescription = when (tabs[position].id) { tab.contentDescription = tabs[position].title(this)
LIST -> tabs[position].arguments[1]
else -> getString(tabs[position].text)
}
if (tabs[position].id == DIRECT) { if (tabs[position].id == DIRECT) {
val badge = tab.orCreateBadge val badge = tab.orCreateBadge
badge.isVisible = activeAccount.hasDirectMessageBadge badge.isVisible = activeAccount.hasDirectMessageBadge

42
app/src/main/java/com/keylesspalace/tusky/components/notifications/NotificationsViewModel.kt

@ -308,27 +308,27 @@ class NotificationsViewModel @Inject constructor(
) )
) )
val response = db.withTransaction { val (idAbovePlaceholder, idBelowPlaceholder) = db.withTransaction {
val idAbovePlaceholder = notificationsDao.getIdAbove(account.id, placeholderId) notificationsDao.getIdAbove(account.id, placeholderId) to
val idBelowPlaceholder = notificationsDao.getIdBelow(account.id, placeholderId) notificationsDao.getIdBelow(account.id, placeholderId)
when (readingOrder) { }
// Using minId, loads up to LOAD_AT_ONCE statuses with IDs immediately val response = when (readingOrder) {
// after minId and no larger than maxId // Using minId, loads up to LOAD_AT_ONCE statuses with IDs immediately
ReadingOrder.OLDEST_FIRST -> api.notifications( // after minId and no larger than maxId
maxId = idAbovePlaceholder, ReadingOrder.OLDEST_FIRST -> api.notifications(
minId = idBelowPlaceholder, maxId = idAbovePlaceholder,
limit = TimelineViewModel.LOAD_AT_ONCE, minId = idBelowPlaceholder,
excludes = excludes.value limit = TimelineViewModel.LOAD_AT_ONCE,
) excludes = excludes.value
// Using sinceId, loads up to LOAD_AT_ONCE statuses immediately before )
// maxId, and no smaller than minId. // Using sinceId, loads up to LOAD_AT_ONCE statuses immediately before
ReadingOrder.NEWEST_FIRST -> api.notifications( // maxId, and no smaller than minId.
maxId = idAbovePlaceholder, ReadingOrder.NEWEST_FIRST -> api.notifications(
sinceId = idBelowPlaceholder, maxId = idAbovePlaceholder,
limit = TimelineViewModel.LOAD_AT_ONCE, sinceId = idBelowPlaceholder,
excludes = excludes.value limit = TimelineViewModel.LOAD_AT_ONCE,
) excludes = excludes.value
} )
} }
val notifications = response.body() val notifications = response.body()

38
app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/CachedTimelineViewModel.kt

@ -157,25 +157,25 @@ class CachedTimelineViewModel @Inject constructor(
Placeholder(placeholderId, loading = true).toEntity(tuskyAccountId = account.id) Placeholder(placeholderId, loading = true).toEntity(tuskyAccountId = account.id)
) )
val response = db.withTransaction { val (idAbovePlaceholder, idBelowPlaceholder) = db.withTransaction {
val idAbovePlaceholder = timelineDao.getIdAbove(account.id, placeholderId) timelineDao.getIdAbove(account.id, placeholderId) to
val idBelowPlaceholder = timelineDao.getIdBelow(account.id, placeholderId) timelineDao.getIdBelow(account.id, placeholderId)
when (readingOrder) { }
// Using minId, loads up to LOAD_AT_ONCE statuses with IDs immediately val response = when (readingOrder) {
// after minId and no larger than maxId // Using minId, loads up to LOAD_AT_ONCE statuses with IDs immediately
OLDEST_FIRST -> api.homeTimeline( // after minId and no larger than maxId
maxId = idAbovePlaceholder, OLDEST_FIRST -> api.homeTimeline(
minId = idBelowPlaceholder, maxId = idAbovePlaceholder,
limit = LOAD_AT_ONCE minId = idBelowPlaceholder,
) limit = LOAD_AT_ONCE
// Using sinceId, loads up to LOAD_AT_ONCE statuses immediately before )
// maxId, and no smaller than minId. // Using sinceId, loads up to LOAD_AT_ONCE statuses immediately before
NEWEST_FIRST -> api.homeTimeline( // maxId, and no smaller than minId.
maxId = idAbovePlaceholder, NEWEST_FIRST -> api.homeTimeline(
sinceId = idBelowPlaceholder, maxId = idAbovePlaceholder,
limit = LOAD_AT_ONCE sinceId = idBelowPlaceholder,
) limit = LOAD_AT_ONCE
} )
} }
val statuses = response.body() val statuses = response.body()

11
app/src/main/res/drawable/dialog_background.xml

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:insetLeft="16dp"
android:insetTop="16dp"
android:insetRight="16dp"
android:insetBottom="16dp">
<shape android:shape="rectangle">
<corners android:radius="?attr/dialogCornerRadius" />
<solid android:color="@color/colorBackground" />
</shape>
</inset>

20
app/src/main/res/values/styles.xml

@ -94,9 +94,9 @@
<item name="snackbarButtonStyle">@style/TuskyButton.TextButton</item> <item name="snackbarButtonStyle">@style/TuskyButton.TextButton</item>
<!-- for dialogs created with MaterialALertDialogBuilder --> <!-- for dialogs created with MaterialALertDialogBuilder -->
<item name="materialAlertDialogTheme">@style/TuskyDialogOverlay</item> <item name="materialAlertDialogTheme">@style/TuskyMaterialDialogOverlay</item>
<!-- for dialogs opened from preferences --> <!-- for dialogs opened from preferences -->
<item name="alertDialogTheme">@style/TuskyDialogOverlay</item> <item name="alertDialogTheme">@style/TuskyAlertDialog</item>
<item name="dialogCornerRadius">16dp</item> <item name="dialogCornerRadius">16dp</item>
<item name="materialTimePickerTheme">@style/TuskyTimePickerOverlay</item> <item name="materialTimePickerTheme">@style/TuskyTimePickerOverlay</item>
@ -146,12 +146,22 @@
<item name="android:colorControlNormal">@color/white</item> <item name="android:colorControlNormal">@color/white</item>
</style> </style>
<style name="TuskyDialogOverlay" parent="@style/ThemeOverlay.Material3.MaterialAlertDialog"> <style name="TuskyDialogFragment" parent="@style/ThemeOverlay.Material3.Dialog">
<item name="alertDialogStyle">@style/TuskyDialog</item> <item name="android:windowBackground">@drawable/dialog_background</item>
<item name="android:backgroundDimAmount">0.5</item> <item name="android:backgroundDimAmount">0.5</item>
</style> </style>
<style name="TuskyDialog" parent="@style/MaterialAlertDialog.Material3"> <style name="TuskyAlertDialog" parent="@style/ThemeOverlay.Material3.Dialog.Alert">
<item name="android:windowBackground">@drawable/dialog_background</item>
<item name="android:backgroundDimAmount">0.5</item>
</style>
<style name="TuskyMaterialDialogOverlay" parent="@style/ThemeOverlay.Material3.MaterialAlertDialog">
<item name="alertDialogStyle">@style/TuskyMaterialDialog</item>
<item name="android:backgroundDimAmount">0.5</item>
</style>
<style name="TuskyMaterialDialog" parent="@style/MaterialAlertDialog.Material3">
<item name="shapeAppearance">@style/ShapeAppearance.Material3.Corner.Large</item> <item name="shapeAppearance">@style/ShapeAppearance.Material3.Corner.Large</item>
<item name="backgroundTint">@color/colorBackground</item> <item name="backgroundTint">@color/colorBackground</item>
</style> </style>

BIN
fastlane/metadata/android/en-US/images/phoneScreenshots/01_timeline.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 923 KiB

BIN
fastlane/metadata/android/en-US/images/phoneScreenshots/03_profile.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 KiB

After

Width:  |  Height:  |  Size: 640 KiB

Loading…
Cancel
Save