アンケートの文字数制限。通知タップのsetAutoCancel
This commit is contained in:
parent
300a590eba
commit
591b2272ab
|
@ -9,8 +9,8 @@ android {
|
|||
applicationId "jp.juggler.subwaytooter"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 26
|
||||
versionCode 132
|
||||
versionName "1.3.2"
|
||||
versionCode 133
|
||||
versionName "1.3.3"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
|
|
|
@ -1042,7 +1042,7 @@ public class PollingService extends JobService {
|
|||
builder
|
||||
.setContentIntent( pi_click )
|
||||
.setDeleteIntent( pi_delete )
|
||||
.setAutoCancel( false )
|
||||
.setAutoCancel( true )
|
||||
.setSmallIcon( R.drawable.ic_notification ) // ここは常に白テーマのアイコンを使う
|
||||
.setColor( ContextCompat.getColor( service, R.color.Light_colorAccent ) ) // ここは常に白テーマの色を使う
|
||||
.setWhen( item.notification.time_created_at );
|
||||
|
|
|
@ -88,6 +88,32 @@ public class PostHelper {
|
|||
return;
|
||||
}
|
||||
|
||||
if( enquete_items != null && ! enquete_items.isEmpty() ){
|
||||
for(int n=0,ne =enquete_items.size();n<ne;++n){
|
||||
String item = enquete_items.get(n);
|
||||
if( TextUtils.isEmpty( item ) ){
|
||||
if( n < 2 ){
|
||||
Utils.showToast( activity, true, R.string.enquete_item_is_empty, n + 1 );
|
||||
return;
|
||||
}
|
||||
}else{
|
||||
int code_count = item.codePointCount( 0,item.length() );
|
||||
if( code_count > 15 ){
|
||||
int over = code_count - 15;
|
||||
Utils.showToast( activity, true, R.string.enquete_item_too_long, n + 1, over );
|
||||
return;
|
||||
}else if( n > 0 ){
|
||||
for( int i = 0 ; i < n ; ++ i ){
|
||||
if( item.equals( enquete_items.get( i ) ) ){
|
||||
Utils.showToast( activity, true, R.string.enquete_item_duplicate, n + 1 );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( ! bConfirmAccount ){
|
||||
DlgConfirm.open( activity
|
||||
, activity.getString( R.string.confirm_post_from, AcctColor.getNickname( account.acct ) )
|
||||
|
@ -166,6 +192,8 @@ public class PostHelper {
|
|||
, body_string
|
||||
);
|
||||
}else{
|
||||
|
||||
|
||||
JSONObject json = new JSONObject( );
|
||||
try{
|
||||
json.put("status",content);
|
||||
|
|
|
@ -459,7 +459,11 @@
|
|||
<string name="auto_cw">Automatically hide long text (set line counts greater than 0 to enable this option. app restart required)</string>
|
||||
<string name="auto_cw_prefix">(Automatic CW)</string>
|
||||
|
||||
<!--<string name="abc_action_bar_home_description">Revenir à l\'accueil</string>-->
|
||||
<string name="enquete_item_is_empty">Enquete choice %1$d is empty.</string>
|
||||
<string name="enquete_item_too_long">Enquete choice %1$d is too long. please decrease %2$d character(s).</string>
|
||||
<string name="enquete_item_duplicate">Enquete choice %1$d is a duplicate of other choice.</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>-->
|
||||
<!--<string name="abc_action_bar_home_subtitle_description_format">%1$s, %2$s, %3$s</string>-->
|
||||
<!--<string name="abc_action_bar_up_description">Revenir en haut de la page</string>-->
|
||||
|
|
|
@ -745,4 +745,8 @@
|
|||
<string name="dont_use_action_button_with_quick_toot_bar">簡易投稿バーではIMEのアクションボタンを無効にする(アプリ再起動が必要)</string>
|
||||
<string name="auto_cw">自動的に長文を隠す (0より大きい行数を指定すると有効になります。アプリ再起動が必要)</string>
|
||||
<string name="auto_cw_prefix">(自動CW)</string>
|
||||
|
||||
<string name="enquete_item_is_empty">アンケート項目%1$dがカラです</string>
|
||||
<string name="enquete_item_too_long">アンケート項目%1$dが長すぎます。あと%2$d文字削ってください</string>
|
||||
<string name="enquete_item_duplicate">アンケート項目%1$dは他の項目と重複してます</string>
|
||||
</resources>
|
||||
|
|
|
@ -453,5 +453,8 @@
|
|||
<string name="dont_use_action_button_with_quick_toot_bar">Disable IME Action button when using \"Quick Toot\" bar (app restart required)</string>
|
||||
<string name="auto_cw">Automatically hide long text (set line counts greater than 0 to enable this option. app restart required)</string>
|
||||
<string name="auto_cw_prefix">(Automatic CW)</string>
|
||||
<string name="enquete_item_is_empty">Enquete choice %1$d is empty.</string>
|
||||
<string name="enquete_item_too_long">Enquete choice %1$d is too long. please decrease %2$d character(s).</string>
|
||||
<string name="enquete_item_duplicate">Enquete choice %1$d is a duplicate of other choice.</string>
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue