app: patch to compile

main
Alibek Omarov 4 years ago
parent fb867c928c
commit caf0873cf7
  1. 3
      app/src/main/java/com/keylesspalace/tusky/components/notifications/NotificationWorker.kt
  2. 2
      app/src/main/java/com/keylesspalace/tusky/fragment/preference/AccountPreferencesFragment.kt
  3. 2
      app/src/main/java/com/keylesspalace/tusky/fragment/preference/NotificationPreferencesFragment.kt
  4. 2
      app/src/main/java/com/keylesspalace/tusky/service/SendTootService.kt

@ -42,9 +42,10 @@ class NotificationWorker(
if (account.notificationsEnabled) {
try {
Log.d(TAG, "getting Notifications for " + account.fullName)
// don't care about withMuted because they are always silently ignored
val notificationsResponse = mastodonApi.notificationsWithAuth(
String.format("Bearer %s", account.accessToken),
account.domain
account.domain, true
).execute()
val notifications = notificationsResponse.body()
if (notificationsResponse.isSuccessful && notifications != null) {

@ -25,6 +25,7 @@ import com.google.android.material.snackbar.Snackbar
import com.keylesspalace.tusky.*
import com.keylesspalace.tusky.appstore.EventHub
import com.keylesspalace.tusky.appstore.PreferenceChangedEvent
import com.keylesspalace.tusky.components.notifications.NotificationHelper
import com.keylesspalace.tusky.components.instancemute.InstanceListActivity
import com.keylesspalace.tusky.db.AccountEntity
import com.keylesspalace.tusky.db.AccountManager
@ -35,7 +36,6 @@ import com.keylesspalace.tusky.entity.Status
import com.keylesspalace.tusky.network.MastodonApi
import com.keylesspalace.tusky.settings.*
import com.keylesspalace.tusky.util.ThemeUtils
import com.keylesspalace.tusky.util.NotificationHelper
import com.mikepenz.iconics.IconicsDrawable
import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial
import com.mikepenz.iconics.utils.colorInt

@ -107,7 +107,7 @@ class NotificationPreferencesFragment : PreferenceFragmentCompat(), Injectable {
isIconSpaceReserved = false
isChecked = activeAccount.notificationsEmojiReactions
setOnPreferenceChangeListener { _, newValue ->
updateAccount { it.noitificationsEmojiReactions = newValue as Boolean }
updateAccount { it.notificationsEmojiReactions = newValue as Boolean }
true
}
}

@ -18,6 +18,7 @@ import com.keylesspalace.tusky.R
import com.keylesspalace.tusky.appstore.EventHub
import com.keylesspalace.tusky.appstore.StatusComposedEvent
import com.keylesspalace.tusky.appstore.StatusScheduledEvent
import com.keylesspalace.tusky.components.notifications.NotificationHelper
import com.keylesspalace.tusky.db.AccountManager
import com.keylesspalace.tusky.db.AppDatabase
import com.keylesspalace.tusky.di.Injectable
@ -26,7 +27,6 @@ import com.keylesspalace.tusky.entity.NewStatus
import com.keylesspalace.tusky.entity.Status
import com.keylesspalace.tusky.network.MastodonApi
import com.keylesspalace.tusky.util.SaveTootHelper
import com.keylesspalace.tusky.util.NotificationHelper
import dagger.android.AndroidInjection
import kotlinx.android.parcel.Parcelize
import retrofit2.Call

Loading…
Cancel
Save