1
0
mirror of https://github.com/tateisu/SubwayTooter synced 2024-12-28 09:50:59 +01:00

リファクタ

This commit is contained in:
tateisu 2017-10-08 11:40:47 +09:00
parent 62441c0f60
commit 6c22a3bb62
2 changed files with 22 additions and 4 deletions

View File

@ -59,7 +59,6 @@ import jp.juggler.subwaytooter.util.Utils;
@SuppressWarnings("WeakerAccess") class Column implements StreamReader.Callback {
private static final LogCategory log = new LogCategory( "Column" );
interface Callback {
boolean isActivityStart();
}
@ -3309,6 +3308,27 @@ import jp.juggler.subwaytooter.util.Utils;
}
}
public boolean canReloadWhenRefreshTop(){
switch( column_type ){
default:
return false;
case TYPE_SEARCH_PORTAL:
case TYPE_SEARCH:
case TYPE_CONVERSATION:
return true;
}
// static final int TYPE_FAVOURITES = 5;
// static final int TYPE_REPORTS = 6;
// static final int TYPE_MUTES = 11;
// static final int TYPE_BLOCKS = 12;
// static final int TYPE_FOLLOW_REQUESTS = 13;
// static final int TYPE_BOOSTED_BY = 14;
// static final int TYPE_FAVOURITED_BY = 15;
// static final int TYPE_DOMAIN_BLOCKS = 16;
}
boolean canStreaming(){
switch( column_type ){
default:

View File

@ -578,9 +578,7 @@ class ColumnViewHolder
// リロードやリフレッシュ操作で直るようにする
column.addColumnViewHolder( this );
if( direction == SwipyRefreshLayoutDirection.TOP &&
( column.column_type == Column.TYPE_SEARCH_PORTAL || column.column_type == Column.TYPE_SEARCH )
){
if( direction == SwipyRefreshLayoutDirection.TOP && column.canReloadWhenRefreshTop() ){
swipyRefreshLayout.setRefreshing( false );
activity.handler.post( new Runnable() {
@Override public void run(){