1
0
mirror of https://github.com/tateisu/SubwayTooter synced 2024-12-25 00:21:26 +01:00

アプリ情報の開発者リンクの表記を改善。アカウント追加時に鍵付きアカウントなら公開範囲のデフォルトを非公開にする。投稿画面でアカウント切り替え時に、公開範囲を適度に狭める。

This commit is contained in:
tateisu 2017-04-28 17:14:24 +09:00
parent 943498928b
commit c5bb7d065f
5 changed files with 27 additions and 11 deletions

View File

@ -33,7 +33,7 @@ public class ActAbout extends AppCompatActivity {
Button b;
b = (Button) findViewById( R.id.btnDeveloper );
b.setText( developer_acct );
b.setText( getString(R.string.search_for,developer_acct ));
b.setOnClickListener( new View.OnClickListener() {
@Override public void onClick( View v ){
Intent data = new Intent();

View File

@ -604,8 +604,13 @@ public class ActMain extends AppCompatActivity
this.row_id = SavedAccount.insert( host, user, result.object, result.token_info );
SavedAccount account = SavedAccount.loadAccount( log, row_id );
if( account != null ){
if( account.locked ){
account.visibility = TootStatus.VISIBILITY_PRIVATE;
account.saveSetting();
}
Utils.showToast(ActMain. this, false, R.string.account_confirmed );
AlarmService.startCheck( ActMain.this );
onAccountUpdated( account );
addColumn( account, Column.TYPE_HOME );
}
}
}
@ -683,10 +688,7 @@ public class ActMain extends AppCompatActivity
return col;
}
private void onAccountUpdated( SavedAccount data ){
Utils.showToast( this, false, R.string.account_confirmed );
addColumn( data, Column.TYPE_HOME );
}
void performOpenUser( SavedAccount access_info, TootAccount user ){
addColumn( access_info, Column.TYPE_PROFILE, user.id );

View File

@ -10,7 +10,6 @@ import android.os.AsyncTask;
import android.os.Bundle;
import android.provider.OpenableColumns;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v4.os.AsyncTaskCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
@ -286,12 +285,13 @@ public class ActPost extends AppCompatActivity implements View.OnClickListener {
}
if( this.account == null ){
// 表示を未選択に更新
setAccount( null );
}
updateContentWarning();
showMediaAttachment();
updateVisibility();
showVisibility();
updateTextCount();
showReplyTo();
}
@ -456,7 +456,17 @@ public class ActPost extends AppCompatActivity implements View.OnClickListener {
@Override
public void onClick( DialogInterface dialog, int which ){
if( which >= 0 && which < tmp_account_list.size() ){
setAccount( tmp_account_list.get( which ) );
SavedAccount account =tmp_account_list.get( which );
setAccount( account );
try{
if( account.visibility != null && TootStatus.compareVisibility( visibility, account.visibility ) > 0 ){
Utils.showToast( ActPost.this, true, R.string.spoil_visibility_for_account );
visibility = account.visibility;
showVisibility();
}
}catch(Throwable ex){
ex.printStackTrace( );
}
}
}
} )
@ -704,7 +714,7 @@ public class ActPost extends AppCompatActivity implements View.OnClickListener {
String visibility;
private void updateVisibility(){
private void showVisibility(){
btnVisibility.setImageResource( Styler.getVisibilityIcon( this, visibility ) );
}
@ -735,7 +745,7 @@ public class ActPost extends AppCompatActivity implements View.OnClickListener {
visibility = TootStatus.VISIBILITY_DIRECT;
break;
}
updateVisibility();
showVisibility();
}
} )
.setNegativeButton( R.string.cancel, null )

View File

@ -180,4 +180,6 @@
<string name="regex_filter">正規表現フィルタ(上級者向け)</string>
<string name="confirm_delete_notification">ユーザへの通知データがタンスのサーバから削除されます。よろしいですか?</string>
<string name="notification_delete">通知の削除</string>
<string name="search_for">%1$s を検索</string>
<string name="spoil_visibility_for_account">公開範囲をアカウントの既定値に狭めました</string>
</resources>

View File

@ -179,4 +179,6 @@
<string name="regex_error">regex error</string>
<string name="notification_delete">delete notification</string>
<string name="confirm_delete_notification">your notification data on instance sarver will be deleted. Are you sure?</string>
<string name="search_for">search %1$s</string>
<string name="spoil_visibility_for_account">visivility is spoiled for account.</string>
</resources>