diff --git a/app/src/main/java/jp/juggler/subwaytooter/Column.java b/app/src/main/java/jp/juggler/subwaytooter/Column.java index 90d20781..6742a779 100644 --- a/app/src/main/java/jp/juggler/subwaytooter/Column.java +++ b/app/src/main/java/jp/juggler/subwaytooter/Column.java @@ -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: diff --git a/app/src/main/java/jp/juggler/subwaytooter/ColumnViewHolder.java b/app/src/main/java/jp/juggler/subwaytooter/ColumnViewHolder.java index d6f4c5c2..272299d4 100644 --- a/app/src/main/java/jp/juggler/subwaytooter/ColumnViewHolder.java +++ b/app/src/main/java/jp/juggler/subwaytooter/ColumnViewHolder.java @@ -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(){