mirror of
https://github.com/tateisu/SubwayTooter
synced 2025-01-11 00:44:03 +01:00
refactor and add workaround for crash report
This commit is contained in:
parent
90f08df268
commit
54f851cca1
@ -533,7 +533,7 @@ class ActPost : AsyncActivity(),
|
||||
}
|
||||
} else {
|
||||
when(requestCode) {
|
||||
REQUEST_CODE_CUSTOM_THUMBNAIL -> checkCustomThumbnail(
|
||||
REQUEST_CODE_CUSTOM_THUMBNAIL -> uploadCustomThumbnail(
|
||||
data?.handleGetContentResult(
|
||||
contentResolver
|
||||
)
|
||||
@ -1770,7 +1770,7 @@ class ActPost : AsyncActivity(),
|
||||
|
||||
private var lastPostAttachment : PostAttachment? = null
|
||||
|
||||
private fun checkCustomThumbnail(srcList : ArrayList<GetContentResultEntry>?) {
|
||||
private fun uploadCustomThumbnail(srcList : ArrayList<GetContentResultEntry>?) {
|
||||
val src = srcList?.elementAtOrNull(0) ?: return
|
||||
|
||||
val account = this@ActPost.account
|
||||
|
@ -343,10 +343,14 @@ public class ColorPickerDialog extends DialogFragment implements OnTouchListener
|
||||
|
||||
@Override public void afterTextChanged(Editable s) {
|
||||
if (hexEditText.isFocused()) {
|
||||
int color = parseColorString(s.toString());
|
||||
if (color != colorPicker.getColor()) {
|
||||
fromEditText = true;
|
||||
colorPicker.setColor(color, true);
|
||||
try{
|
||||
int color = parseColorString( s.toString() );
|
||||
if (color != colorPicker.getColor()) {
|
||||
fromEditText = true;
|
||||
colorPicker.setColor(color, true);
|
||||
}
|
||||
}catch( NumberFormatException ex ){
|
||||
// nothing to do
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user