アプリ情報の開発者リンクの表記を改善。アカウント追加時に鍵付きアカウントなら公開範囲のデフォルトを非公開にする。投稿画面でアカウント切り替え時に、公開範囲を適度に狭める。
This commit is contained in:
parent
943498928b
commit
c5bb7d065f
|
@ -33,7 +33,7 @@ public class ActAbout extends AppCompatActivity {
|
||||||
Button b;
|
Button b;
|
||||||
|
|
||||||
b = (Button) findViewById( R.id.btnDeveloper );
|
b = (Button) findViewById( R.id.btnDeveloper );
|
||||||
b.setText( developer_acct );
|
b.setText( getString(R.string.search_for,developer_acct ));
|
||||||
b.setOnClickListener( new View.OnClickListener() {
|
b.setOnClickListener( new View.OnClickListener() {
|
||||||
@Override public void onClick( View v ){
|
@Override public void onClick( View v ){
|
||||||
Intent data = new Intent();
|
Intent data = new Intent();
|
||||||
|
|
|
@ -604,8 +604,13 @@ public class ActMain extends AppCompatActivity
|
||||||
this.row_id = SavedAccount.insert( host, user, result.object, result.token_info );
|
this.row_id = SavedAccount.insert( host, user, result.object, result.token_info );
|
||||||
SavedAccount account = SavedAccount.loadAccount( log, row_id );
|
SavedAccount account = SavedAccount.loadAccount( log, row_id );
|
||||||
if( account != null ){
|
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 );
|
AlarmService.startCheck( ActMain.this );
|
||||||
onAccountUpdated( account );
|
addColumn( account, Column.TYPE_HOME );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -683,10 +688,7 @@ public class ActMain extends AppCompatActivity
|
||||||
return col;
|
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 ){
|
void performOpenUser( SavedAccount access_info, TootAccount user ){
|
||||||
addColumn( access_info, Column.TYPE_PROFILE, user.id );
|
addColumn( access_info, Column.TYPE_PROFILE, user.id );
|
||||||
|
|
|
@ -10,7 +10,6 @@ import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.OpenableColumns;
|
import android.provider.OpenableColumns;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.v4.content.ContextCompat;
|
|
||||||
import android.support.v4.os.AsyncTaskCompat;
|
import android.support.v4.os.AsyncTaskCompat;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
@ -286,12 +285,13 @@ public class ActPost extends AppCompatActivity implements View.OnClickListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
if( this.account == null ){
|
if( this.account == null ){
|
||||||
|
// 表示を未選択に更新
|
||||||
setAccount( null );
|
setAccount( null );
|
||||||
}
|
}
|
||||||
|
|
||||||
updateContentWarning();
|
updateContentWarning();
|
||||||
showMediaAttachment();
|
showMediaAttachment();
|
||||||
updateVisibility();
|
showVisibility();
|
||||||
updateTextCount();
|
updateTextCount();
|
||||||
showReplyTo();
|
showReplyTo();
|
||||||
}
|
}
|
||||||
|
@ -456,7 +456,17 @@ public class ActPost extends AppCompatActivity implements View.OnClickListener {
|
||||||
@Override
|
@Override
|
||||||
public void onClick( DialogInterface dialog, int which ){
|
public void onClick( DialogInterface dialog, int which ){
|
||||||
if( which >= 0 && which < tmp_account_list.size() ){
|
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;
|
String visibility;
|
||||||
|
|
||||||
private void updateVisibility(){
|
private void showVisibility(){
|
||||||
btnVisibility.setImageResource( Styler.getVisibilityIcon( this, visibility ) );
|
btnVisibility.setImageResource( Styler.getVisibilityIcon( this, visibility ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -735,7 +745,7 @@ public class ActPost extends AppCompatActivity implements View.OnClickListener {
|
||||||
visibility = TootStatus.VISIBILITY_DIRECT;
|
visibility = TootStatus.VISIBILITY_DIRECT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
updateVisibility();
|
showVisibility();
|
||||||
}
|
}
|
||||||
} )
|
} )
|
||||||
.setNegativeButton( R.string.cancel, null )
|
.setNegativeButton( R.string.cancel, null )
|
||||||
|
|
|
@ -180,4 +180,6 @@
|
||||||
<string name="regex_filter">正規表現フィルタ(上級者向け)</string>
|
<string name="regex_filter">正規表現フィルタ(上級者向け)</string>
|
||||||
<string name="confirm_delete_notification">ユーザへの通知データがタンスのサーバから削除されます。よろしいですか?</string>
|
<string name="confirm_delete_notification">ユーザへの通知データがタンスのサーバから削除されます。よろしいですか?</string>
|
||||||
<string name="notification_delete">通知の削除</string>
|
<string name="notification_delete">通知の削除</string>
|
||||||
|
<string name="search_for">%1$s を検索</string>
|
||||||
|
<string name="spoil_visibility_for_account">公開範囲をアカウントの既定値に狭めました</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -179,4 +179,6 @@
|
||||||
<string name="regex_error">regex error</string>
|
<string name="regex_error">regex error</string>
|
||||||
<string name="notification_delete">delete notification</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="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>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue