Crash fixes
This commit is contained in:
@@ -243,6 +243,8 @@ public abstract class BaseStatusListFragment<T extends DisplayItemsParent> exten
|
|||||||
}
|
}
|
||||||
|
|
||||||
private ImageStatusDisplayItem.Holder<?> findPhotoViewHolder(int index){
|
private ImageStatusDisplayItem.Holder<?> findPhotoViewHolder(int index){
|
||||||
|
if(list==null)
|
||||||
|
return null;
|
||||||
int offset=0;
|
int offset=0;
|
||||||
for(StatusDisplayItem item:displayItems){
|
for(StatusDisplayItem item:displayItems){
|
||||||
if(item.parentID.equals(parentID)){
|
if(item.parentID.equals(parentID)){
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ public class ThreadFragment extends StatusListFragment{
|
|||||||
}
|
}
|
||||||
result.descendants=filterStatuses(result.descendants);
|
result.descendants=filterStatuses(result.descendants);
|
||||||
result.ancestors=filterStatuses(result.ancestors);
|
result.ancestors=filterStatuses(result.ancestors);
|
||||||
footerProgress.setVisibility(View.GONE);
|
if(footerProgress!=null)
|
||||||
|
footerProgress.setVisibility(View.GONE);
|
||||||
data.addAll(result.descendants);
|
data.addAll(result.descendants);
|
||||||
int prevCount=displayItems.size();
|
int prevCount=displayItems.size();
|
||||||
onAppendItems(result.descendants);
|
onAppendItems(result.descendants);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.joinmastodon.android.fragments.onboarding;
|
package org.joinmastodon.android.fragments.onboarding;
|
||||||
|
|
||||||
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
@@ -110,7 +111,11 @@ public class AccountActivationFragment extends AppKitFragment{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onButtonClick(){
|
private void onButtonClick(){
|
||||||
startActivity(Intent.makeMainSelectorActivity(Intent.ACTION_MAIN, Intent.CATEGORY_APP_EMAIL).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
|
try{
|
||||||
|
startActivity(Intent.makeMainSelectorActivity(Intent.ACTION_MAIN, Intent.CATEGORY_APP_EMAIL).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
|
||||||
|
}catch(ActivityNotFoundException x){
|
||||||
|
Toast.makeText(getActivity(), R.string.no_app_to_handle_action, Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onBackButtonClick(){
|
private void onBackButtonClick(){
|
||||||
|
|||||||
@@ -105,6 +105,8 @@ public class InstanceCatalogFragment extends BaseRecyclerFragment<CatalogInstanc
|
|||||||
.setCallback(new Callback<>(){
|
.setCallback(new Callback<>(){
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<CatalogInstance> result){
|
public void onSuccess(List<CatalogInstance> result){
|
||||||
|
if(getActivity()==null)
|
||||||
|
return;
|
||||||
Map<String, List<CatalogInstance>> byLang=result.stream().collect(Collectors.groupingBy(ci->ci.language));
|
Map<String, List<CatalogInstance>> byLang=result.stream().collect(Collectors.groupingBy(ci->ci.language));
|
||||||
for(List<CatalogInstance> group:byLang.values()){
|
for(List<CatalogInstance> group:byLang.values()){
|
||||||
Collections.sort(group, (a, b)->{
|
Collections.sort(group, (a, b)->{
|
||||||
|
|||||||
@@ -305,4 +305,5 @@
|
|||||||
<string name="error_saving_file">Error saving file</string>
|
<string name="error_saving_file">Error saving file</string>
|
||||||
<string name="file_saved">File saved</string>
|
<string name="file_saved">File saved</string>
|
||||||
<string name="downloading">Downloading…</string>
|
<string name="downloading">Downloading…</string>
|
||||||
|
<string name="no_app_to_handle_action">There\'s no app to handle this action</string>
|
||||||
</resources>
|
</resources>
|
||||||
Reference in New Issue
Block a user