mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-02-07 15:48:39 +01:00
bug fix
This commit is contained in:
parent
c78df7a9c1
commit
d304ea58a5
@ -217,12 +217,11 @@ public class MainActivity extends AppCompatActivity implements ActivityResultCal
|
||||
public void onBackPressed() {
|
||||
if (viewPager.getCurrentItem() > 0) {
|
||||
viewPager.setCurrentItem(0);
|
||||
} else {
|
||||
if (drawerLayout.isOpen()) {
|
||||
drawerLayout.close();
|
||||
} else {
|
||||
super.onBackPressed();
|
||||
}
|
||||
} else if (!drawerLayout.isOpen()) {
|
||||
super.onBackPressed();
|
||||
}
|
||||
if (drawerLayout.isOpen()) {
|
||||
drawerLayout.close();
|
||||
}
|
||||
}
|
||||
|
||||
@ -267,10 +266,13 @@ public class MainActivity extends AppCompatActivity implements ActivityResultCal
|
||||
setCurrentUser(((Account) serializable).getUser());
|
||||
}
|
||||
}
|
||||
// reset tab pages
|
||||
adapter = new HomeAdapter(this);
|
||||
viewPager.setAdapter(adapter);
|
||||
break;
|
||||
|
||||
// current user's profile changed
|
||||
case ProfileEditor.RETURN_PROFILE_CHANGED:
|
||||
// current user's profile information like name or images were updated
|
||||
case ProfileEditor.RETURN_PROFILE_UPDATED:
|
||||
if (data != null) {
|
||||
Serializable serializable = data.getSerializableExtra(ProfileEditor.KEY_USER);
|
||||
if (serializable instanceof User) {
|
||||
|
@ -62,7 +62,7 @@ public class ProfileEditor extends MediaActivity implements OnClickListener, Asy
|
||||
/**
|
||||
* return code used if profile information has changed
|
||||
*/
|
||||
public static final int RETURN_PROFILE_CHANGED = 0xF5C0E570;
|
||||
public static final int RETURN_PROFILE_UPDATED = 0xF5C0E570;
|
||||
|
||||
private UserUpdater editorAsync;
|
||||
private GlobalSettings settings;
|
||||
@ -246,7 +246,7 @@ public class ProfileEditor extends MediaActivity implements OnClickListener, Asy
|
||||
Intent data = new Intent();
|
||||
data.putExtra(KEY_USER, result.user);
|
||||
Toast.makeText(getApplicationContext(), R.string.info_profile_updated, Toast.LENGTH_SHORT).show();
|
||||
setResult(RETURN_PROFILE_CHANGED, data);
|
||||
setResult(RETURN_PROFILE_UPDATED, data);
|
||||
finish();
|
||||
} else {
|
||||
String message = ErrorUtils.getErrorMessage(this, result.exception);
|
||||
|
@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.method.ScrollingMovementMethod;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
@ -61,6 +62,7 @@ public class DescriptionView extends LinearLayout implements OnClickListener {
|
||||
label.setMaxLines(4);
|
||||
label.setMaxWidth(displayWidth / 2);
|
||||
label.setTextColor(settings.getTextColor());
|
||||
label.setMovementMethod(ScrollingMovementMethod.getInstance());
|
||||
closeButton.setImageDrawable(closeIcon);
|
||||
|
||||
setBackground(background);
|
||||
|
Loading…
x
Reference in New Issue
Block a user