diff --git a/app/src/main/java/org/pixeldroid/app/posts/feeds/cachedFeeds/notifications/NotificationsRemoteMediator.kt b/app/src/main/java/org/pixeldroid/app/posts/feeds/cachedFeeds/notifications/NotificationsRemoteMediator.kt index 609c5a1c..a4799e5c 100644 --- a/app/src/main/java/org/pixeldroid/app/posts/feeds/cachedFeeds/notifications/NotificationsRemoteMediator.kt +++ b/app/src/main/java/org/pixeldroid/app/posts/feeds/cachedFeeds/notifications/NotificationsRemoteMediator.kt @@ -23,6 +23,7 @@ import org.pixeldroid.app.utils.di.PixelfedAPIHolder import org.pixeldroid.app.utils.api.objects.Notification import retrofit2.HttpException import java.io.IOException +import java.lang.Exception import java.lang.NullPointerException import javax.inject.Inject @@ -77,6 +78,8 @@ class NotificationsRemoteMediator @Inject constructor( return MediatorResult.Error(exception) } catch (exception: HttpException) { return MediatorResult.Error(exception) + } catch (exception: Exception){ + return MediatorResult.Error(exception) } } } \ No newline at end of file diff --git a/app/src/main/java/org/pixeldroid/app/profile/ProfileActivity.kt b/app/src/main/java/org/pixeldroid/app/profile/ProfileActivity.kt index fb84c5ca..81d9d11b 100644 --- a/app/src/main/java/org/pixeldroid/app/profile/ProfileActivity.kt +++ b/app/src/main/java/org/pixeldroid/app/profile/ProfileActivity.kt @@ -71,12 +71,12 @@ class ProfileActivity : BaseActivity() { // get the view model @Suppress("UNCHECKED_CAST") viewModel = ViewModelProvider(this, ProfileViewModelFactory( - ProfileContentRepository( - apiHolder.setToCurrentUser(), - accountId - ) + ProfileContentRepository( + apiHolder.setToCurrentUser(), + accountId ) - ).get(FeedViewModel::class.java) as FeedViewModel + ) + )[FeedViewModel::class.java] as FeedViewModel profileAdapter = ProfilePostsAdapter() initAdapter(binding.profileProgressBar, binding.profileRefreshLayout, diff --git a/app/src/main/res/layout/activity_profile.xml b/app/src/main/res/layout/activity_profile.xml index 2ebc9cac..8d529b8c 100644 --- a/app/src/main/res/layout/activity_profile.xml +++ b/app/src/main/res/layout/activity_profile.xml @@ -1,167 +1,180 @@ - - - - - - - - - - - - - - - - - -