Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
tom79 2020-02-21 09:27:41 +01:00
commit 26db8087f0
7 changed files with 33 additions and 35 deletions

View File

@ -41,8 +41,6 @@
Lead developer: [toot.fedilab.app/@fedilab](https://toot.fedilab.app/@fedilab)
<br>
Developer: [toot.fedilab.app/@kasun](https://toot.fedilab.app/@kasun)
## Backers

View File

@ -130,7 +130,6 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou
TextView txt_developers, txt_ux, txt_thankyou3, txt_thankyou1, txt_thankyou2;
txt_developers = findViewById(R.id.txt_developers);
txt_ux = findViewById(R.id.txt_ux);
txt_thankyou3 = findViewById(R.id.txt_thankyou3);
txt_thankyou1 = findViewById(R.id.txt_thankyou1);
txt_thankyou2 = findViewById(R.id.txt_thankyou2);
@ -241,7 +240,6 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou
lv_ux.setAdapter(accountSearchWebAdapterUxUiDesigners);
if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON || MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA) {
new RetrieveRemoteDataAsyncTask(getApplicationContext(), "kasun", "toot.fedilab.app", AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
new RetrieveRemoteDataAsyncTask(getApplicationContext(), "fedilab", "toot.fedilab.app", AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
new RetrieveRemoteDataAsyncTask(getApplicationContext(), "mmarif", "mastodon.social", AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
new RetrieveRemoteDataAsyncTask(getApplicationContext(), "PhotonQyv", "mastodon.xyz", AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
@ -288,17 +286,6 @@ public class AboutActivity extends BaseActivity implements OnRetrieveRemoteAccou
Helper.openBrowser(AboutActivity.this, "https://social.tchncs.de/@angrytux");
}
});
name = new SpannableString("@kasun@stoot.fedilab.app");
name.setSpan(new UnderlineSpan(), 0, name.length(), 0);
txt_thankyou3.setText(name);
txt_thankyou3.setVisibility(View.VISIBLE);
txt_thankyou3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.openBrowser(AboutActivity.this, "https://toot.fedilab.app/@kasun");
}
});
}
}

View File

@ -972,13 +972,29 @@ public abstract class BaseMainActivity extends BaseActivity
public boolean onMenuItemClick(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_logout:
Helper.logout(getApplicationContext());
Intent myIntent = new Intent(BaseMainActivity.this, LoginActivity.class);
startActivity(myIntent);
finish();
AlertDialog.Builder dialogBuilderLogout = new AlertDialog.Builder(BaseMainActivity.this, style);
dialogBuilderLogout.setMessage(R.string.logout_confirmation);
dialogBuilderLogout.setPositiveButton(R.string.action_logout, (dialog, id) -> {
Helper.logout(getApplicationContext());
Intent myIntent = new Intent(BaseMainActivity.this, LoginActivity.class);
startActivity(myIntent);
dialog.dismiss();
finish();
});
dialogBuilderLogout.setNegativeButton(R.string.cancel, (dialog, id) -> dialog.dismiss());
AlertDialog alertDialogLogout = dialogBuilderLogout.create();
alertDialogLogout.show();
return true;
case R.id.action_logout_account:
Helper.logoutCurrentUser(BaseMainActivity.this);
AlertDialog.Builder dialogBuilderLogoutAccount = new AlertDialog.Builder(BaseMainActivity.this, style);
dialogBuilderLogoutAccount.setMessage(R.string.logout_confirmation);
dialogBuilderLogoutAccount.setPositiveButton(R.string.action_logout, (dialog, id) -> {
Helper.logoutCurrentUser(BaseMainActivity.this);
dialog.dismiss();
});
dialogBuilderLogoutAccount.setNegativeButton(R.string.cancel, (dialog, id) -> dialog.dismiss());
AlertDialog alertDialogLogoutAccount = dialogBuilderLogoutAccount.create();
alertDialogLogoutAccount.show();
return true;
case R.id.action_privacy:
Intent intent = new Intent(getApplicationContext(), PrivacyActivity.class);

View File

@ -591,7 +591,7 @@ public class PixelfedComposeActivity extends BaseActivity implements UploadStatu
} else {
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(PixelfedComposeActivity.this, style);
dialogBuilder.setMessage(R.string.save_draft);
dialogBuilder.setPositiveButton(R.string.validate, new DialogInterface.OnClickListener() {
dialogBuilder.setPositiveButton(R.string.save, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
if (accountReply == null) {
@ -603,7 +603,7 @@ public class PixelfedComposeActivity extends BaseActivity implements UploadStatu
finish();
}
});
dialogBuilder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
dialogBuilder.setNegativeButton(R.string.discard, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();
@ -1473,7 +1473,7 @@ public class PixelfedComposeActivity extends BaseActivity implements UploadStatu
} else {
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(PixelfedComposeActivity.this, style);
dialogBuilder.setMessage(R.string.save_draft);
dialogBuilder.setPositiveButton(R.string.validate, new DialogInterface.OnClickListener() {
dialogBuilder.setPositiveButton(R.string.save, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
if (accountReply == null) {
@ -1485,7 +1485,7 @@ public class PixelfedComposeActivity extends BaseActivity implements UploadStatu
finish();
}
});
dialogBuilder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
dialogBuilder.setNegativeButton(R.string.discard, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();

View File

@ -51,6 +51,7 @@ import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
@ -758,7 +759,7 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
} else {
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(TootActivity.this, style);
dialogBuilder.setMessage(R.string.save_draft);
dialogBuilder.setPositiveButton(R.string.validate, new DialogInterface.OnClickListener() {
dialogBuilder.setPositiveButton(R.string.save, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
if (accountReply == null) {
@ -770,7 +771,7 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
finish();
}
});
dialogBuilder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
dialogBuilder.setNegativeButton(R.string.discard, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();
@ -2510,7 +2511,9 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
}
});
AlertDialog alertDialog = builderInner.create();
alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
alertDialog.show();
input.requestFocus();
}
/**
@ -2634,7 +2637,7 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
} else {
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(TootActivity.this, style);
dialogBuilder.setMessage(R.string.save_draft);
dialogBuilder.setPositiveButton(R.string.validate, new DialogInterface.OnClickListener() {
dialogBuilder.setPositiveButton(R.string.save, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
if (accountReply == null) {
@ -2646,7 +2649,7 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
finish();
}
});
dialogBuilder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
dialogBuilder.setNegativeButton(R.string.discard, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();

View File

@ -165,13 +165,6 @@
android:divider="@null"
android:scrollbars="none" />
<TextView
android:id="@+id/txt_thankyou3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:visibility="gone" />
<TextView
android:id="@+id/txt_thankyou1"
android:layout_width="match_parent"

View File

@ -84,6 +84,7 @@
<string name="insert_emoji">Insert emoji</string>
<string name="no_emoji">The app did not collect custom emojis for the moment.</string>
<string name="live_notif">Live notifications</string>
<string name="logout_confirmation">Are you sure you want to logout?</string>
<!-- Status -->
<string name="no_status">No toot to display</string>
<string name="no_stories">No stories to display</string>