mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-10 12:47:26 +01:00
Fix posting from community home page
This commit resolves the issue that made the app crash after trying to post from a community home page. Closes #70
This commit is contained in:
parent
88fb054640
commit
2ab5ab3ce5
@ -511,7 +511,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void loadSubredditIcon() {
|
private void loadSubredditIcon() {
|
||||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, subredditName, mAccessToken, mOauthRetrofit, mRetrofit.getRetrofit(), iconImageUrl -> {
|
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, communityData.getQualified_name(), mAccessToken, mOauthRetrofit, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||||
iconUrl = iconImageUrl;
|
iconUrl = iconImageUrl;
|
||||||
displaySubredditIcon();
|
displaySubredditIcon();
|
||||||
loadSubredditIconSuccessful = true;
|
loadSubredditIconSuccessful = true;
|
||||||
|
@ -488,7 +488,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void loadSubredditIcon() {
|
private void loadSubredditIcon() {
|
||||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, subredditName,
|
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, communityData.getQualified_name(),
|
||||||
mAccessToken, mOauthRetrofit, mRetrofit.getRetrofit(), iconImageUrl -> {
|
mAccessToken, mOauthRetrofit, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||||
iconUrl = iconImageUrl;
|
iconUrl = iconImageUrl;
|
||||||
displaySubredditIcon();
|
displaySubredditIcon();
|
||||||
|
@ -450,7 +450,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void loadSubredditIcon() {
|
private void loadSubredditIcon() {
|
||||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, subredditName,
|
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, communityData.getQualified_name(),
|
||||||
mAccessToken, mOauthRetrofit, mRetrofit.getRetrofit(), iconImageUrl -> {
|
mAccessToken, mOauthRetrofit, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||||
iconUrl = iconImageUrl;
|
iconUrl = iconImageUrl;
|
||||||
displaySubredditIcon();
|
displaySubredditIcon();
|
||||||
|
@ -1286,27 +1286,27 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
|||||||
break;
|
break;
|
||||||
case PostTypeBottomSheetFragment.TYPE_LINK:
|
case PostTypeBottomSheetFragment.TYPE_LINK:
|
||||||
intent = new Intent(this, PostLinkActivity.class);
|
intent = new Intent(this, PostLinkActivity.class);
|
||||||
intent.putExtra(PostLinkActivity.EXTRA_SUBREDDIT_NAME, communityName);
|
intent.putExtra(PostLinkActivity.EXTRA_SUBREDDIT_NAME, qualifiedName);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
break;
|
break;
|
||||||
case PostTypeBottomSheetFragment.TYPE_IMAGE:
|
case PostTypeBottomSheetFragment.TYPE_IMAGE:
|
||||||
intent = new Intent(this, PostImageActivity.class);
|
intent = new Intent(this, PostImageActivity.class);
|
||||||
intent.putExtra(PostImageActivity.EXTRA_SUBREDDIT_NAME, communityName);
|
intent.putExtra(PostImageActivity.EXTRA_SUBREDDIT_NAME, qualifiedName);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
break;
|
break;
|
||||||
case PostTypeBottomSheetFragment.TYPE_VIDEO:
|
case PostTypeBottomSheetFragment.TYPE_VIDEO:
|
||||||
intent = new Intent(this, PostVideoActivity.class);
|
intent = new Intent(this, PostVideoActivity.class);
|
||||||
intent.putExtra(PostVideoActivity.EXTRA_SUBREDDIT_NAME, communityName);
|
intent.putExtra(PostVideoActivity.EXTRA_SUBREDDIT_NAME, qualifiedName);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
break;
|
break;
|
||||||
case PostTypeBottomSheetFragment.TYPE_GALLERY:
|
case PostTypeBottomSheetFragment.TYPE_GALLERY:
|
||||||
intent = new Intent(this, PostGalleryActivity.class);
|
intent = new Intent(this, PostGalleryActivity.class);
|
||||||
intent.putExtra(PostGalleryActivity.EXTRA_SUBREDDIT_NAME, communityName);
|
intent.putExtra(PostGalleryActivity.EXTRA_SUBREDDIT_NAME, qualifiedName);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
break;
|
break;
|
||||||
case PostTypeBottomSheetFragment.TYPE_POLL:
|
case PostTypeBottomSheetFragment.TYPE_POLL:
|
||||||
intent = new Intent(this, PostPollActivity.class);
|
intent = new Intent(this, PostPollActivity.class);
|
||||||
intent.putExtra(PostPollActivity.EXTRA_SUBREDDIT_NAME, communityName);
|
intent.putExtra(PostPollActivity.EXTRA_SUBREDDIT_NAME, qualifiedName);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user