v1.0.8
- 「…」メニューに「URLを引用」を追加 - friends.nico インスタンスだとお気に入りアイコンの図柄を変更 - nicoru 絵文字と hohoemi 絵文字を整理
|
@ -14,6 +14,7 @@
|
|||
<w>hashtags</w>
|
||||
<w>idempotency</w>
|
||||
<w>kenglxn</w>
|
||||
<w>nicoru</w>
|
||||
<w>noto</w>
|
||||
<w>nsfw</w>
|
||||
<w>proc</w>
|
||||
|
|
|
@ -9,8 +9,8 @@ android {
|
|||
applicationId "jp.juggler.subwaytooter"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 25
|
||||
versionCode 107
|
||||
versionName "1.0.7"
|
||||
versionCode 108
|
||||
versionName "1.0.8"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
|
|
|
@ -280,10 +280,10 @@ public class ActColumnCustomize extends AppCompatActivity
|
|||
c = column.header_fg_color;
|
||||
if( c == 0 ){
|
||||
tvColumnName.setTextColor( Styler.getAttributeColor( this, android.R.attr.textColorPrimary ) );
|
||||
Styler.setIconDefaultColor( this, ivColumnHeader, Column.getIconAttrId( column.column_type ) );
|
||||
Styler.setIconDefaultColor( this, ivColumnHeader, column.getIconAttrId( column.column_type ) );
|
||||
}else{
|
||||
tvColumnName.setTextColor( c );
|
||||
Styler.setIconCustomColor( this, ivColumnHeader, c, Column.getIconAttrId( column.column_type ) );
|
||||
Styler.setIconCustomColor( this, ivColumnHeader, c, column.getIconAttrId( column.column_type ) );
|
||||
}
|
||||
|
||||
tvColumnName.setText( column.getColumnName( false ) );
|
||||
|
|
|
@ -270,7 +270,7 @@ public class ActColumnList extends AppCompatActivity {
|
|||
tvAccess.setPaddingRelative( acct_pad_lr, 0, acct_pad_lr, 0 );
|
||||
tvName.setText( item.name );
|
||||
ivColumnIcon.setImageResource( Styler.getAttributeResourceId(
|
||||
ActColumnList.this, Column.getIconAttrId( item.type ) ) );
|
||||
ActColumnList.this, Column.getIconAttrId( item.acct, item.type ) ) );
|
||||
}
|
||||
|
||||
// @Override
|
||||
|
@ -306,7 +306,7 @@ public class ActColumnList extends AppCompatActivity {
|
|||
|
||||
ImageView ivColumnIcon = (ImageView) dragView.findViewById( R.id.ivColumnIcon );
|
||||
ivColumnIcon.setImageResource( Styler.getAttributeResourceId(
|
||||
ActColumnList.this, Column.getIconAttrId( item.type ) ) );
|
||||
ActColumnList.this, Column.getIconAttrId( item.acct, item.type ) ) );
|
||||
|
||||
dragView.findViewById( R.id.ivBookmark ).setVisibility(
|
||||
clickedView.findViewById( R.id.ivBookmark ).getVisibility()
|
||||
|
|
|
@ -948,9 +948,9 @@ public class ActMain extends AppCompatActivity
|
|||
|
||||
c = column.header_fg_color;
|
||||
if( c == 0 ){
|
||||
Styler.setIconDefaultColor( this, ivIcon, Column.getIconAttrId( column.column_type ) );
|
||||
Styler.setIconDefaultColor( this, ivIcon, column.getIconAttrId( column.column_type ) );
|
||||
}else{
|
||||
Styler.setIconCustomColor( this, ivIcon, c, Column.getIconAttrId( column.column_type ) );
|
||||
Styler.setIconCustomColor( this, ivIcon, c, column.getIconAttrId( column.column_type ) );
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1982,8 +1982,12 @@ public class ActMain extends AppCompatActivity
|
|||
};
|
||||
|
||||
private void performTootButton(){
|
||||
openPost(etQuickToot.getText().toString());
|
||||
}
|
||||
|
||||
public void openPost(final String initial_text){
|
||||
post_helper.closeAcctPopup();
|
||||
final String initial_text = etQuickToot.getText().toString();
|
||||
|
||||
if( pager_adapter != null ){
|
||||
Column c = pager_adapter.getColumn( pager.getCurrentItem() );
|
||||
if( c != null && ! c.access_info.isPseudo() ){
|
||||
|
|
|
@ -508,7 +508,17 @@ class Column implements StreamReader.Callback {
|
|||
}
|
||||
}
|
||||
|
||||
static int getIconAttrId( int type ){
|
||||
int getIconAttrId( int type ){
|
||||
return getIconAttrId( access_info.acct, type );
|
||||
}
|
||||
|
||||
private static final Pattern reNicoruHost = Pattern.compile( "@friends\\.nico", Pattern.CASE_INSENSITIVE );
|
||||
|
||||
public static boolean isNicoru( String acct ){
|
||||
return acct != null && reNicoruHost.matcher( acct ).find();
|
||||
}
|
||||
|
||||
static int getIconAttrId( String acct, int type ){
|
||||
switch( type ){
|
||||
|
||||
default:
|
||||
|
@ -528,7 +538,7 @@ class Column implements StreamReader.Callback {
|
|||
return R.attr.btn_statuses;
|
||||
|
||||
case TYPE_FAVOURITES:
|
||||
return R.attr.btn_favourite;
|
||||
return isNicoru(acct) ? R.attr.ic_nicoru : R.attr.btn_favourite;
|
||||
|
||||
case TYPE_NOTIFICATIONS:
|
||||
return R.attr.btn_notification;
|
||||
|
@ -540,7 +550,7 @@ class Column implements StreamReader.Callback {
|
|||
return R.attr.btn_boost;
|
||||
|
||||
case TYPE_FAVOURITED_BY:
|
||||
return R.attr.btn_favourite;
|
||||
return isNicoru(acct) ? R.attr.ic_nicoru : R.attr.btn_favourite;
|
||||
|
||||
case TYPE_HASHTAG:
|
||||
return R.attr.ic_hashtag;
|
||||
|
|
|
@ -389,14 +389,14 @@ class ColumnViewHolder
|
|||
if( c == 0 ){
|
||||
tvColumnIndex.setTextColor( Styler.getAttributeColor( activity, R.attr.colorColumnHeaderPageNumber ) );
|
||||
tvColumnName.setTextColor( Styler.getAttributeColor( activity, android.R.attr.textColorPrimary ) );
|
||||
Styler.setIconDefaultColor( activity, ivColumnIcon, Column.getIconAttrId( column.column_type ) );
|
||||
Styler.setIconDefaultColor( activity, ivColumnIcon, column.getIconAttrId( column.column_type ) );
|
||||
Styler.setIconDefaultColor( activity, btnColumnSetting, R.attr.ic_tune );
|
||||
Styler.setIconDefaultColor( activity, btnColumnReload, R.attr.btn_refresh );
|
||||
Styler.setIconDefaultColor( activity, btnColumnClose, R.attr.btn_close );
|
||||
}else{
|
||||
tvColumnIndex.setTextColor( c );
|
||||
tvColumnName.setTextColor( c );
|
||||
Styler.setIconCustomColor( activity, ivColumnIcon, c, Column.getIconAttrId( column.column_type ) );
|
||||
Styler.setIconCustomColor( activity, ivColumnIcon, c, column.getIconAttrId( column.column_type ) );
|
||||
Styler.setIconCustomColor( activity, btnColumnSetting, c, R.attr.ic_tune );
|
||||
Styler.setIconCustomColor( activity, btnColumnReload, c, R.attr.btn_refresh );
|
||||
Styler.setIconCustomColor( activity, btnColumnClose, c, R.attr.btn_close );
|
||||
|
|
|
@ -112,6 +112,9 @@ class DlgContextMenu implements View.OnClickListener, View.OnLongClickListener {
|
|||
btnConversationAnotherAccount.setOnClickListener( this );
|
||||
btnAvatarImage.setOnClickListener( this );
|
||||
|
||||
viewRoot.findViewById( R.id.btnQuoteUrlStatus ).setOnClickListener( this );
|
||||
viewRoot.findViewById( R.id.btnQuoteUrlAccount ).setOnClickListener( this );
|
||||
|
||||
final ArrayList< SavedAccount > account_list = SavedAccount.loadAccountList( activity,log );
|
||||
// final ArrayList< SavedAccount > account_list_non_pseudo_same_instance = new ArrayList<>();
|
||||
|
||||
|
@ -483,6 +486,20 @@ class DlgContextMenu implements View.OnClickListener, View.OnLongClickListener {
|
|||
if( url != null ) activity.openChromeTab( pos, access_info, url, true );
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.btnQuoteUrlStatus:
|
||||
if( status != null ){
|
||||
String url = TextUtils.isEmpty( status.url ) ? "" : status.url +" ";
|
||||
activity.openPost( url );
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.btnQuoteUrlAccount:
|
||||
if( who != null ){
|
||||
String url = TextUtils.isEmpty( who.url ) ? "" : who.url +" ";
|
||||
activity.openPost( url );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ class ItemViewHolder implements View.OnClickListener, View.OnLongClickListener {
|
|||
showBoost(
|
||||
n.account
|
||||
, n.time_created_at
|
||||
, R.attr.btn_favourite
|
||||
, Column.isNicoru( access_info.getFullAcct( n.account) )? R.attr.ic_nicoru : R.attr.btn_favourite
|
||||
, Utils.formatSpannable1( activity, R.string.display_name_favourited_by, n.account.display_name )
|
||||
);
|
||||
if( n.status != null ) showStatus( activity, n.status );
|
||||
|
|
|
@ -75,9 +75,11 @@ class StatusButtons implements View.OnClickListener, View.OnLongClickListener {
|
|||
int color_normal = Styler.getAttributeColor( activity, R.attr.colorImageButton );
|
||||
int color_accent = Styler.getAttributeColor( activity, R.attr.colorImageButtonAccent );
|
||||
|
||||
int fav_icon_attr = Column.isNicoru( access_info.getFullAcct( status.account ) ) ? R.attr.ic_nicoru : R.attr.btn_favourite;
|
||||
|
||||
if( status instanceof MSPToot ){
|
||||
setButton( btnBoost, true, color_normal, R.attr.btn_boost, "" );
|
||||
setButton( btnFavourite, true, color_normal, R.attr.btn_favourite, "" );
|
||||
setButton( btnFavourite, true, color_normal,fav_icon_attr, "" );
|
||||
}else if( status instanceof TootStatus ){
|
||||
TootStatus ts = (TootStatus) status;
|
||||
|
||||
|
@ -96,7 +98,7 @@ class StatusButtons implements View.OnClickListener, View.OnLongClickListener {
|
|||
setButton( btnFavourite, false, color_normal, R.attr.btn_refresh, "?" );
|
||||
}else{
|
||||
int color = ( ts.favourited ? color_accent : color_normal );
|
||||
setButton( btnFavourite, true, color, R.attr.btn_favourite, Long.toString( ts.favourites_count ) );
|
||||
setButton( btnFavourite, true, color, fav_icon_attr, Long.toString( ts.favourites_count ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -85,6 +85,7 @@ public abstract class Emojione
|
|||
}
|
||||
|
||||
static final Pattern reNicoru = Pattern.compile( "\\Anicoru\\d*\\z",Pattern.CASE_INSENSITIVE );
|
||||
static final Pattern reHohoemi = Pattern.compile( "\\Ahohoemi\\d*\\z",Pattern.CASE_INSENSITIVE );
|
||||
|
||||
public static CharSequence decodeEmoji( Context context, String s ){
|
||||
|
||||
|
@ -101,8 +102,10 @@ public abstract class Emojione
|
|||
//
|
||||
String unicode = map_name2unicode.get(matcher.group(1));
|
||||
if( unicode == null ){
|
||||
if( reNicoru.matcher( matcher.group(1) ).find() ){
|
||||
decode_env.addImageSpan( s.substring( start, end ), context, R.drawable.emoji_hohoemi );
|
||||
if( reHohoemi.matcher( matcher.group(1) ).find() ){
|
||||
decode_env.addImageSpan( s.substring( start, end ), context, R.drawable.emoji_hohoemi );
|
||||
}else if( reNicoru.matcher( matcher.group(1) ).find() ){
|
||||
decode_env.addImageSpan( s.substring( start, end ), context, R.drawable.emoji_nicoru );
|
||||
}else{
|
||||
decode_env.addUnicodeString( s.substring( start, end ) );
|
||||
}
|
||||
|
|
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.3 KiB |
|
@ -74,6 +74,21 @@
|
|||
android:textAllCaps="false"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnQuoteUrlStatus"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/btn_bg_transparent"
|
||||
android:gravity="start|center_vertical"
|
||||
android:minHeight="32dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="4dp"
|
||||
android:text="@string/quote_url"
|
||||
android:textAllCaps="false"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnBoostedBy"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -332,6 +347,20 @@
|
|||
android:text="@string/select_and_copy"
|
||||
android:textAllCaps="false"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/btnQuoteUrlAccount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/btn_bg_transparent"
|
||||
android:gravity="start|center_vertical"
|
||||
android:minHeight="32dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="4dp"
|
||||
android:text="@string/quote_url"
|
||||
android:textAllCaps="false"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnFollowRequestOK"
|
||||
|
|
|
@ -394,6 +394,7 @@
|
|||
<string name="search_is_not_available_on_pseudo_account">Search function became not available on pseudo account .</string>
|
||||
<string name="conversation_from_another_account">Conversation view from another account</string>
|
||||
<string name="show_avatar_image">Show avatar image</string>
|
||||
<string name="quote_url">Quote URL</string>
|
||||
|
||||
<!--<string name="abc_action_bar_home_description">Revenir à l\'accueil</string>-->
|
||||
<!--<string name="abc_action_bar_home_description_format">%1$s, %2$s</string>-->
|
||||
|
|
|
@ -681,5 +681,6 @@
|
|||
<string name="search_is_not_available_on_pseudo_account">疑似アカウントでは検索APIを利用できなくなりました</string>
|
||||
<string name="conversation_from_another_account">別アカウントで会話の流れ</string>
|
||||
<string name="show_avatar_image">アバター画像を表示</string>
|
||||
<string name="quote_url">URLを引用…</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -119,4 +119,6 @@
|
|||
<attr name="ic_plugin" format="reference" />
|
||||
<attr name="ic_domain_block" format="reference" />
|
||||
|
||||
<attr name="ic_nicoru" format="reference" />
|
||||
|
||||
</resources>
|
|
@ -389,5 +389,6 @@
|
|||
<string name="search_is_not_available_on_pseudo_account">Search function became not available on pseudo account .</string>
|
||||
<string name="conversation_from_another_account">Conversation view from another account</string>
|
||||
<string name="show_avatar_image">Show avatar image</string>
|
||||
<string name="quote_url">Quote URL</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -87,6 +87,8 @@
|
|||
<item name="ic_plugin">@drawable/ic_plugin</item>
|
||||
<item name="ic_domain_block">@drawable/ic_domain_block</item>
|
||||
|
||||
<item name="ic_nicoru">@drawable/ic_nicoru</item>
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
@ -178,6 +180,8 @@
|
|||
<item name="ic_plugin">@drawable/ic_plugin_dark</item>
|
||||
<item name="ic_domain_block">@drawable/ic_domain_block_dark</item>
|
||||
|
||||
<item name="ic_nicoru">@drawable/ic_nicoru_dark</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.Dark.NoActionBar" parent="AppTheme.Dark">
|
||||
|
|
|
@ -94,3 +94,7 @@ my $res_dir = "app/src/main/res";
|
|||
#resize_scales( "_ArtWork/media_type_video.png" ,$res_dir,"drawable","media_type_video",-1,-1);
|
||||
|
||||
resize_scales( "_ArtWork/hohoemi.png" ,$res_dir,"drawable","emoji_hohoemi",0,24);
|
||||
resize_scales( "_ArtWork/nicoru.png" ,$res_dir,"drawable","emoji_nicoru",0,24);
|
||||
|
||||
resize_scales( "_ArtWork/ic_nicoru.png" ,$res_dir,"drawable","ic_nicoru",0,32);
|
||||
resize_scales( "_ArtWork/ic_nicoru_dark.png" ,$res_dir,"drawable","ic_nicoru_dark",0,32);
|
||||
|
|