Skip to content

Commit 280f2f0

Browse files
authored
Prepare release 129 (#4880)
Let's get those three fixes out. #4864 is the important one.
2 parents c630c47 + 6cfda66 commit 280f2f0

File tree

10 files changed

+78
-52
lines changed

10 files changed

+78
-52
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66

77
### Significant bug fixes
88

9+
## v27.2
10+
11+
### Significant bug fixes
12+
13+
- The title of a hashtag tab now shows the actual hashtags again (instead of just "Hashtags") https://github.com/tuskyapp/Tusky/pull/4868
14+
- Makes sure the background color of a dialogs is correct https://github.com/tuskyapp/Tusky/pull/4864
15+
- Fixes an issue where Tusky would freeze while loading a timeline gap https://github.com/tuskyapp/Tusky/pull/4865
16+
917
## v27.1
1018

1119
### New features and other improvements

app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ android {
2929
namespace "com.keylesspalace.tusky"
3030
minSdk 24
3131
targetSdk 34
32-
versionCode 128
33-
versionName "27.1"
32+
versionCode 129
33+
versionName "27.2"
3434
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3535
vectorDrawables.useSupportLibrary = true
3636

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class AccountsInListFragment : DialogFragment() {
7575
viewModel.load(listId)
7676
}
7777

78-
override fun getTheme() = R.style.TuskyDialogOverlay
78+
override fun getTheme() = R.style.TuskyDialogFragment
7979

8080
override fun onStart() {
8181
super.onStart()

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

+1-4
Original file line numberDiff line numberDiff line change
@@ -886,10 +886,7 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvider {
886886
tabLayoutMediator = TabLayoutMediator(activeTabLayout, binding.viewPager, true) {
887887
tab: TabLayout.Tab, position: Int ->
888888
tab.icon = AppCompatResources.getDrawable(this@MainActivity, tabs[position].icon)
889-
tab.contentDescription = when (tabs[position].id) {
890-
LIST -> tabs[position].arguments[1]
891-
else -> getString(tabs[position].text)
892-
}
889+
tab.contentDescription = tabs[position].title(this)
893890
if (tabs[position].id == DIRECT) {
894891
val badge = tab.orCreateBadge
895892
badge.isVisible = activeAccount.hasDirectMessageBadge

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

+21-21
Original file line numberDiff line numberDiff line change
@@ -308,27 +308,27 @@ class NotificationsViewModel @Inject constructor(
308308
)
309309
)
310310

311-
val response = db.withTransaction {
312-
val idAbovePlaceholder = notificationsDao.getIdAbove(account.id, placeholderId)
313-
val idBelowPlaceholder = notificationsDao.getIdBelow(account.id, placeholderId)
314-
when (readingOrder) {
315-
// Using minId, loads up to LOAD_AT_ONCE statuses with IDs immediately
316-
// after minId and no larger than maxId
317-
ReadingOrder.OLDEST_FIRST -> api.notifications(
318-
maxId = idAbovePlaceholder,
319-
minId = idBelowPlaceholder,
320-
limit = TimelineViewModel.LOAD_AT_ONCE,
321-
excludes = excludes.value
322-
)
323-
// Using sinceId, loads up to LOAD_AT_ONCE statuses immediately before
324-
// maxId, and no smaller than minId.
325-
ReadingOrder.NEWEST_FIRST -> api.notifications(
326-
maxId = idAbovePlaceholder,
327-
sinceId = idBelowPlaceholder,
328-
limit = TimelineViewModel.LOAD_AT_ONCE,
329-
excludes = excludes.value
330-
)
331-
}
311+
val (idAbovePlaceholder, idBelowPlaceholder) = db.withTransaction {
312+
notificationsDao.getIdAbove(account.id, placeholderId) to
313+
notificationsDao.getIdBelow(account.id, placeholderId)
314+
}
315+
val response = when (readingOrder) {
316+
// Using minId, loads up to LOAD_AT_ONCE statuses with IDs immediately
317+
// after minId and no larger than maxId
318+
ReadingOrder.OLDEST_FIRST -> api.notifications(
319+
maxId = idAbovePlaceholder,
320+
minId = idBelowPlaceholder,
321+
limit = TimelineViewModel.LOAD_AT_ONCE,
322+
excludes = excludes.value
323+
)
324+
// Using sinceId, loads up to LOAD_AT_ONCE statuses immediately before
325+
// maxId, and no smaller than minId.
326+
ReadingOrder.NEWEST_FIRST -> api.notifications(
327+
maxId = idAbovePlaceholder,
328+
sinceId = idBelowPlaceholder,
329+
limit = TimelineViewModel.LOAD_AT_ONCE,
330+
excludes = excludes.value
331+
)
332332
}
333333

334334
val notifications = response.body()

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

+19-19
Original file line numberDiff line numberDiff line change
@@ -157,25 +157,25 @@ class CachedTimelineViewModel @Inject constructor(
157157
Placeholder(placeholderId, loading = true).toEntity(tuskyAccountId = account.id)
158158
)
159159

160-
val response = db.withTransaction {
161-
val idAbovePlaceholder = timelineDao.getIdAbove(account.id, placeholderId)
162-
val idBelowPlaceholder = timelineDao.getIdBelow(account.id, placeholderId)
163-
when (readingOrder) {
164-
// Using minId, loads up to LOAD_AT_ONCE statuses with IDs immediately
165-
// after minId and no larger than maxId
166-
OLDEST_FIRST -> api.homeTimeline(
167-
maxId = idAbovePlaceholder,
168-
minId = idBelowPlaceholder,
169-
limit = LOAD_AT_ONCE
170-
)
171-
// Using sinceId, loads up to LOAD_AT_ONCE statuses immediately before
172-
// maxId, and no smaller than minId.
173-
NEWEST_FIRST -> api.homeTimeline(
174-
maxId = idAbovePlaceholder,
175-
sinceId = idBelowPlaceholder,
176-
limit = LOAD_AT_ONCE
177-
)
178-
}
160+
val (idAbovePlaceholder, idBelowPlaceholder) = db.withTransaction {
161+
timelineDao.getIdAbove(account.id, placeholderId) to
162+
timelineDao.getIdBelow(account.id, placeholderId)
163+
}
164+
val response = when (readingOrder) {
165+
// Using minId, loads up to LOAD_AT_ONCE statuses with IDs immediately
166+
// after minId and no larger than maxId
167+
OLDEST_FIRST -> api.homeTimeline(
168+
maxId = idAbovePlaceholder,
169+
minId = idBelowPlaceholder,
170+
limit = LOAD_AT_ONCE
171+
)
172+
// Using sinceId, loads up to LOAD_AT_ONCE statuses immediately before
173+
// maxId, and no smaller than minId.
174+
NEWEST_FIRST -> api.homeTimeline(
175+
maxId = idAbovePlaceholder,
176+
sinceId = idBelowPlaceholder,
177+
limit = LOAD_AT_ONCE
178+
)
179179
}
180180

181181
val statuses = response.body()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<inset xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:insetLeft="16dp"
4+
android:insetTop="16dp"
5+
android:insetRight="16dp"
6+
android:insetBottom="16dp">
7+
<shape android:shape="rectangle">
8+
<corners android:radius="?attr/dialogCornerRadius" />
9+
<solid android:color="@color/colorBackground" />
10+
</shape>
11+
</inset>

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

+15-5
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@
9494
<item name="snackbarButtonStyle">@style/TuskyButton.TextButton</item>
9595

9696
<!-- for dialogs created with MaterialALertDialogBuilder -->
97-
<item name="materialAlertDialogTheme">@style/TuskyDialogOverlay</item>
97+
<item name="materialAlertDialogTheme">@style/TuskyMaterialDialogOverlay</item>
9898
<!-- for dialogs opened from preferences -->
99-
<item name="alertDialogTheme">@style/TuskyDialogOverlay</item>
99+
<item name="alertDialogTheme">@style/TuskyAlertDialog</item>
100100
<item name="dialogCornerRadius">16dp</item>
101101

102102
<item name="materialTimePickerTheme">@style/TuskyTimePickerOverlay</item>
@@ -146,12 +146,22 @@
146146
<item name="android:colorControlNormal">@color/white</item>
147147
</style>
148148

149-
<style name="TuskyDialogOverlay" parent="@style/ThemeOverlay.Material3.MaterialAlertDialog">
150-
<item name="alertDialogStyle">@style/TuskyDialog</item>
149+
<style name="TuskyDialogFragment" parent="@style/ThemeOverlay.Material3.Dialog">
150+
<item name="android:windowBackground">@drawable/dialog_background</item>
151151
<item name="android:backgroundDimAmount">0.5</item>
152152
</style>
153153

154-
<style name="TuskyDialog" parent="@style/MaterialAlertDialog.Material3">
154+
<style name="TuskyAlertDialog" parent="@style/ThemeOverlay.Material3.Dialog.Alert">
155+
<item name="android:windowBackground">@drawable/dialog_background</item>
156+
<item name="android:backgroundDimAmount">0.5</item>
157+
</style>
158+
159+
<style name="TuskyMaterialDialogOverlay" parent="@style/ThemeOverlay.Material3.MaterialAlertDialog">
160+
<item name="alertDialogStyle">@style/TuskyMaterialDialog</item>
161+
<item name="android:backgroundDimAmount">0.5</item>
162+
</style>
163+
164+
<style name="TuskyMaterialDialog" parent="@style/MaterialAlertDialog.Material3">
155165
<item name="shapeAppearance">@style/ShapeAppearance.Material3.Corner.Large</item>
156166
<item name="backgroundTint">@color/colorBackground</item>
157167
</style>
Loading
Loading

0 commit comments

Comments
 (0)