Skip to content

Commit 1dab66f

Browse files
committed
fix account notifications
(cherry picked from commit 0c56914)
1 parent dec1c5b commit 1dab66f

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ android {
2929
applicationId = "com.github.andreyasadchy.xtra"
3030
minSdk = 21
3131
targetSdk = 35
32-
versionCode = 261
33-
versionName = "2.38.1"
32+
versionCode = 262
33+
versionName = "2.38.2"
3434
}
3535

3636
buildTypes {

app/src/main/java/com/github/andreyasadchy/xtra/ui/channel/ChannelPagerFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class ChannelPagerFragment : BaseNetworkFragment(), Scrollable, FragmentHost, In
159159
ActivityCompat.checkSelfPermission(activity, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
160160
ActivityCompat.requestPermissions(activity, arrayOf(Manifest.permission.POST_NOTIFICATIONS), 1)
161161
}
162-
viewModel.updateNotifications(TwitchApiHelper.getGQLHeaders(requireContext()), TwitchApiHelper.getHelixHeaders(requireContext()))
162+
viewModel.updateNotifications(TwitchApiHelper.getGQLHeaders(requireContext(), true), TwitchApiHelper.getHelixHeaders(requireContext()))
163163
WorkManager.getInstance(requireContext()).enqueueUniquePeriodicWork(
164164
"live_notifications",
165165
ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,

app/src/main/java/com/github/andreyasadchy/xtra/ui/main/LiveNotificationWorker.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class LiveNotificationWorker @AssistedInject constructor(
4343
override suspend fun doWork(): Result {
4444
val streams = shownNotifications.getNewStreams(
4545
notificationsRepository = notificationsRepository,
46-
gqlHeaders = TwitchApiHelper.getGQLHeaders(context),
46+
gqlHeaders = TwitchApiHelper.getGQLHeaders(context, true),
4747
apolloClient = apolloClient,
4848
helixHeaders = TwitchApiHelper.getHelixHeaders(context),
4949
helixApi = helixApi

app/src/main/java/com/github/andreyasadchy/xtra/ui/settings/SettingsActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class SettingsActivity : AppCompatActivity() {
133133
}
134134
viewModel.restoreSettings(
135135
list = list,
136-
gqlHeaders = TwitchApiHelper.getGQLHeaders(requireContext()),
136+
gqlHeaders = TwitchApiHelper.getGQLHeaders(requireContext(), true),
137137
helixHeaders = TwitchApiHelper.getHelixHeaders(requireContext())
138138
)
139139
}
@@ -343,7 +343,7 @@ class SettingsActivity : AppCompatActivity() {
343343
}
344344
viewModel.toggleNotifications(
345345
enabled = newValue as Boolean,
346-
gqlHeaders = TwitchApiHelper.getGQLHeaders(requireContext()),
346+
gqlHeaders = TwitchApiHelper.getGQLHeaders(requireContext(), true),
347347
helixHeaders = TwitchApiHelper.getHelixHeaders(requireContext())
348348
)
349349
true

0 commit comments

Comments
 (0)