Skip to content

Commit

Permalink
fix account notifications
Browse files Browse the repository at this point in the history
(cherry picked from commit 0c56914)
  • Loading branch information
crackededed committed Nov 14, 2024
1 parent b9105a0 commit f0895d2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ android {
minSdk = 16
targetSdk = 35
versionCode = 121
versionName = "2.38.1"
versionName = "2.38.2"
}

buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class ChannelPagerFragment : BaseNetworkFragment(), Scrollable, FragmentHost, In
ActivityCompat.checkSelfPermission(activity, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(activity, arrayOf(Manifest.permission.POST_NOTIFICATIONS), 1)
}
viewModel.updateNotifications(TwitchApiHelper.getGQLHeaders(requireContext()), TwitchApiHelper.getHelixHeaders(requireContext()))
viewModel.updateNotifications(TwitchApiHelper.getGQLHeaders(requireContext(), true), TwitchApiHelper.getHelixHeaders(requireContext()))
WorkManager.getInstance(requireContext()).enqueueUniquePeriodicWork(
"live_notifications",
ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class LiveNotificationWorker @AssistedInject constructor(
override suspend fun doWork(): Result {
val streams = shownNotifications.getNewStreams(
notificationsRepository = notificationsRepository,
gqlHeaders = TwitchApiHelper.getGQLHeaders(context),
gqlHeaders = TwitchApiHelper.getGQLHeaders(context, true),
gqlApi = graphQLRepository,
helixHeaders = TwitchApiHelper.getHelixHeaders(context),
helixApi = helixApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class SettingsActivity : AppCompatActivity() {
}
viewModel.restoreSettings(
list = list,
gqlHeaders = TwitchApiHelper.getGQLHeaders(requireContext()),
gqlHeaders = TwitchApiHelper.getGQLHeaders(requireContext(), true),
helixHeaders = TwitchApiHelper.getHelixHeaders(requireContext())
)
}
Expand Down Expand Up @@ -509,7 +509,7 @@ class SettingsActivity : AppCompatActivity() {
}
viewModel.toggleNotifications(
enabled = newValue as Boolean,
gqlHeaders = TwitchApiHelper.getGQLHeaders(requireContext()),
gqlHeaders = TwitchApiHelper.getGQLHeaders(requireContext(), true),
helixHeaders = TwitchApiHelper.getHelixHeaders(requireContext())
)
true
Expand Down

0 comments on commit f0895d2

Please sign in to comment.