クラッシュ対応
This commit is contained in:
parent
4ba7cd321a
commit
bcf20ad8bf
|
@ -9,6 +9,7 @@
|
|||
<w>enty</w>
|
||||
<w>favourited</w>
|
||||
<w>firebase</w>
|
||||
<w>gifv</w>
|
||||
<w>hashtag</w>
|
||||
<w>hashtags</w>
|
||||
<w>idempotency</w>
|
||||
|
|
|
@ -9,8 +9,8 @@ android {
|
|||
applicationId "jp.juggler.subwaytooter"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 25
|
||||
versionCode 102
|
||||
versionName "1.0.2"
|
||||
versionCode 103
|
||||
versionName "1.0.3"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
|
|
|
@ -80,15 +80,15 @@ class ItemViewHolder implements View.OnClickListener, View.OnLongClickListener {
|
|||
private final View llSearchTag;
|
||||
private final Button btnSearchTag;
|
||||
|
||||
private @Nullable final TextView tvApplication;
|
||||
@Nullable private final TextView tvApplication;
|
||||
|
||||
private TootStatusLike status;
|
||||
private TootAccount account_thumbnail;
|
||||
private TootAccount account_boost;
|
||||
private TootAccount account_follow;
|
||||
private String search_tag;
|
||||
private TootGap gap;
|
||||
private TootDomainBlock domain_block;
|
||||
@Nullable private TootStatusLike status;
|
||||
@Nullable private TootAccount account_thumbnail;
|
||||
@Nullable private TootAccount account_boost;
|
||||
@Nullable private TootAccount account_follow;
|
||||
@Nullable private String search_tag;
|
||||
@Nullable private TootGap gap;
|
||||
@Nullable private TootDomainBlock domain_block;
|
||||
|
||||
private final boolean bSimpleList;
|
||||
|
||||
|
@ -543,12 +543,16 @@ class ItemViewHolder implements View.OnClickListener, View.OnLongClickListener {
|
|||
|
||||
switch( v.getId() ){
|
||||
case R.id.btnHideMedia:
|
||||
MediaShown.save( status, false );
|
||||
btnShowMedia.setVisibility( View.VISIBLE );
|
||||
if( status != null){
|
||||
MediaShown.save( status, false );
|
||||
btnShowMedia.setVisibility( View.VISIBLE );
|
||||
}
|
||||
break;
|
||||
case R.id.btnShowMedia:
|
||||
MediaShown.save( status, true );
|
||||
btnShowMedia.setVisibility( View.GONE );
|
||||
if( status != null){
|
||||
MediaShown.save( status, true );
|
||||
btnShowMedia.setVisibility( View.GONE );
|
||||
}
|
||||
break;
|
||||
case R.id.ivMedia1:
|
||||
clickMedia( 0 );
|
||||
|
@ -562,12 +566,13 @@ class ItemViewHolder implements View.OnClickListener, View.OnLongClickListener {
|
|||
case R.id.ivMedia4:
|
||||
clickMedia( 3 );
|
||||
break;
|
||||
case R.id.btnContentWarning:{
|
||||
boolean new_shown = ( llContents.getVisibility() == View.GONE );
|
||||
ContentWarning.save( status, new_shown );
|
||||
list_adapter.notifyDataSetChanged();
|
||||
case R.id.btnContentWarning:
|
||||
if( status != null){
|
||||
boolean new_shown = ( llContents.getVisibility() == View.GONE );
|
||||
ContentWarning.save( status, new_shown );
|
||||
list_adapter.notifyDataSetChanged();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case R.id.ivThumbnail:
|
||||
if( access_info.isPseudo() ){
|
||||
|
@ -666,8 +671,10 @@ class ItemViewHolder implements View.OnClickListener, View.OnLongClickListener {
|
|||
// StatusButtonsPopupを表示する
|
||||
void onItemClick( MyListView listView, View anchor ){
|
||||
activity.closeListItemPopup();
|
||||
activity.list_item_popup = new StatusButtonsPopup( activity, column, bSimpleList );
|
||||
activity.list_item_popup.show( listView, anchor, status );
|
||||
if( status != null ){
|
||||
activity.list_item_popup = new StatusButtonsPopup( activity, column, bSimpleList );
|
||||
activity.list_item_popup.show( listView, anchor, status );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,23 +3,18 @@ package jp.juggler.subwaytooter.api;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
import jp.juggler.subwaytooter.api.entity.TootAccount;
|
||||
import jp.juggler.subwaytooter.api.entity.TootNotification;
|
||||
import jp.juggler.subwaytooter.api.entity.TootReport;
|
||||
import jp.juggler.subwaytooter.api.entity.TootStatus;
|
||||
|
||||
/**
|
||||
* Created by tateisu on 2017/05/10.
|
||||
*/
|
||||
|
||||
public class DuplicateMap {
|
||||
|
||||
HashSet< Long > set_status_id = new HashSet<>();
|
||||
HashSet< Long > set_notification_id = new HashSet<>();
|
||||
HashSet< Long > set_report_id = new HashSet<>();
|
||||
HashSet< Long > set_account_id = new HashSet<>();
|
||||
private final HashSet< Long > set_status_id = new HashSet<>();
|
||||
private final HashSet< Long > set_notification_id = new HashSet<>();
|
||||
private final HashSet< Long > set_report_id = new HashSet<>();
|
||||
private final HashSet< Long > set_account_id = new HashSet<>();
|
||||
|
||||
public void clear(){
|
||||
set_status_id.clear();
|
||||
|
@ -28,7 +23,7 @@ public class DuplicateMap {
|
|||
set_account_id.clear();
|
||||
}
|
||||
|
||||
boolean isDuplicate(Object o){
|
||||
private boolean isDuplicate( Object o ){
|
||||
|
||||
if( o instanceof TootStatus ){
|
||||
if( set_status_id.contains( ( (TootStatus) o ).id ) ) return true;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package jp.juggler.subwaytooter.api.entity;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
@ -27,16 +28,16 @@ public class TootAttachment {
|
|||
public static final String TYPE_UNKNOWN = "unknown";
|
||||
|
||||
//URL of the locally hosted version of the image
|
||||
public String url;
|
||||
@Nullable public String url;
|
||||
|
||||
//For remote images, the remote URL of the original image
|
||||
public String remote_url;
|
||||
@Nullable public String remote_url;
|
||||
|
||||
// URL of the preview image
|
||||
public String preview_url;
|
||||
@Nullable public String preview_url;
|
||||
|
||||
// Shorter URL for the image, for insertion into text (only present on local images)
|
||||
public String text_url;
|
||||
@Nullable public String text_url;
|
||||
|
||||
public JSONObject json;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ public class TootDomainBlock {
|
|||
// domain
|
||||
public String domain;
|
||||
|
||||
public TootDomainBlock( String sv ){
|
||||
private TootDomainBlock( String sv ){
|
||||
this.domain = sv;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,14 +3,17 @@ package jp.juggler.subwaytooter.api.entity;
|
|||
public class TootGap {
|
||||
public String max_id;
|
||||
public String since_id;
|
||||
|
||||
public TootGap( String max_id, String since_id ){
|
||||
this.max_id = max_id;
|
||||
this.since_id = since_id;
|
||||
}
|
||||
public TootGap( long max_id, String since_id ){
|
||||
this.max_id = Long.toString(max_id);
|
||||
this.since_id = since_id;
|
||||
}
|
||||
|
||||
// public TootGap( long max_id, String since_id ){
|
||||
// this.max_id = Long.toString(max_id);
|
||||
// this.since_id = since_id;
|
||||
// }
|
||||
|
||||
public TootGap( long max_id, long since_id ){
|
||||
this.max_id = Long.toString(max_id);
|
||||
this.since_id = Long.toString(since_id);
|
||||
|
|
|
@ -3,8 +3,7 @@ package jp.juggler.subwaytooter.api.entity;
|
|||
import android.support.annotation.Nullable;
|
||||
import android.text.Spannable;
|
||||
|
||||
|
||||
public abstract class TootStatusLike extends TootId{
|
||||
public abstract class TootStatusLike extends TootId {
|
||||
|
||||
//URL to the status page (can be remote)
|
||||
public String url;
|
||||
|
@ -14,7 +13,6 @@ public abstract class TootStatusLike extends TootId{
|
|||
// The TootAccount which posted the status
|
||||
@Nullable public TootAccount account;
|
||||
|
||||
|
||||
//The number of reblogs for the status
|
||||
public long reblogs_count;
|
||||
|
||||
|
@ -39,7 +37,7 @@ public abstract class TootStatusLike extends TootId{
|
|||
public Spannable decoded_content;
|
||||
|
||||
//Application from which the status was posted
|
||||
public TootApplication application;
|
||||
@Nullable public TootApplication application;
|
||||
|
||||
public long time_created_at;
|
||||
|
||||
|
|
Loading…
Reference in New Issue