mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-29 19:14:44 +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() {
|
||||
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;
|
||||
displaySubredditIcon();
|
||||
loadSubredditIconSuccessful = true;
|
||||
|
@ -488,7 +488,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr
|
||||
}
|
||||
|
||||
private void loadSubredditIcon() {
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, subredditName,
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, communityData.getQualified_name(),
|
||||
mAccessToken, mOauthRetrofit, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
iconUrl = iconImageUrl;
|
||||
displaySubredditIcon();
|
||||
|
@ -450,7 +450,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr
|
||||
}
|
||||
|
||||
private void loadSubredditIcon() {
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, subredditName,
|
||||
LoadSubredditIcon.loadSubredditIcon(mExecutor, new Handler(), mRedditDataRoomDatabase, communityData.getQualified_name(),
|
||||
mAccessToken, mOauthRetrofit, mRetrofit.getRetrofit(), iconImageUrl -> {
|
||||
iconUrl = iconImageUrl;
|
||||
displaySubredditIcon();
|
||||
|
@ -1286,27 +1286,27 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
||||
break;
|
||||
case PostTypeBottomSheetFragment.TYPE_LINK:
|
||||
intent = new Intent(this, PostLinkActivity.class);
|
||||
intent.putExtra(PostLinkActivity.EXTRA_SUBREDDIT_NAME, communityName);
|
||||
intent.putExtra(PostLinkActivity.EXTRA_SUBREDDIT_NAME, qualifiedName);
|
||||
startActivity(intent);
|
||||
break;
|
||||
case PostTypeBottomSheetFragment.TYPE_IMAGE:
|
||||
intent = new Intent(this, PostImageActivity.class);
|
||||
intent.putExtra(PostImageActivity.EXTRA_SUBREDDIT_NAME, communityName);
|
||||
intent.putExtra(PostImageActivity.EXTRA_SUBREDDIT_NAME, qualifiedName);
|
||||
startActivity(intent);
|
||||
break;
|
||||
case PostTypeBottomSheetFragment.TYPE_VIDEO:
|
||||
intent = new Intent(this, PostVideoActivity.class);
|
||||
intent.putExtra(PostVideoActivity.EXTRA_SUBREDDIT_NAME, communityName);
|
||||
intent.putExtra(PostVideoActivity.EXTRA_SUBREDDIT_NAME, qualifiedName);
|
||||
startActivity(intent);
|
||||
break;
|
||||
case PostTypeBottomSheetFragment.TYPE_GALLERY:
|
||||
intent = new Intent(this, PostGalleryActivity.class);
|
||||
intent.putExtra(PostGalleryActivity.EXTRA_SUBREDDIT_NAME, communityName);
|
||||
intent.putExtra(PostGalleryActivity.EXTRA_SUBREDDIT_NAME, qualifiedName);
|
||||
startActivity(intent);
|
||||
break;
|
||||
case PostTypeBottomSheetFragment.TYPE_POLL:
|
||||
intent = new Intent(this, PostPollActivity.class);
|
||||
intent.putExtra(PostPollActivity.EXTRA_SUBREDDIT_NAME, communityName);
|
||||
intent.putExtra(PostPollActivity.EXTRA_SUBREDDIT_NAME, qualifiedName);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user