code cleanup
This commit is contained in:
parent
21abb2f71e
commit
a6a7f92480
@ -122,7 +122,7 @@ public class LinkBrowser extends AsyncTask<Uri, Void, Void> {
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCancelled(Void v) {
|
||||
protected void onCancelled() {
|
||||
popup.dismiss();
|
||||
}
|
||||
}
|
@ -91,7 +91,7 @@ public class MessageLoader extends AsyncTask<Long, Void, Long> {
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCancelled(Long l) {
|
||||
protected void onCancelled() {
|
||||
if (ui.get() == null) return;
|
||||
|
||||
SwipeRefreshLayout mRefresh = ui.get().findViewById(R.id.dm_reload);
|
||||
|
@ -99,7 +99,7 @@ public class MessageUpload extends AsyncTask<String, Void, Boolean> {
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCancelled(Boolean v) {
|
||||
protected void onCancelled() {
|
||||
popup.dismiss();
|
||||
}
|
||||
}
|
@ -2,9 +2,11 @@ package org.nuclearfog.twidda.backend;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.text.Editable;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
@ -17,6 +19,7 @@ import com.squareup.picasso.Picasso;
|
||||
import org.nuclearfog.twidda.R;
|
||||
import org.nuclearfog.twidda.backend.items.TwitterUser;
|
||||
import org.nuclearfog.twidda.database.DatabaseAdapter;
|
||||
import org.nuclearfog.twidda.window.ImageDetail;
|
||||
import org.nuclearfog.twidda.window.ProfileEdit;
|
||||
|
||||
import java.io.File;
|
||||
@ -121,14 +124,24 @@ public class ProfileEditor extends AsyncTask<Integer, Void, Integer> {
|
||||
|
||||
switch (mode) {
|
||||
case READ_DATA:
|
||||
ImageView pb_image = ui.get().findViewById(R.id.edit_pb);
|
||||
String link = user.getImageLink() + "_bigger";
|
||||
Picasso.get().load(link).into(pb_image);
|
||||
|
||||
edit_name.append(user.getUsername());
|
||||
edit_link.append(user.getLink());
|
||||
edit_loc.append(user.getLocation());
|
||||
edit_bio.append(user.getBio());
|
||||
|
||||
ImageView pb_image = ui.get().findViewById(R.id.edit_pb);
|
||||
String link = user.getImageLink() + "_bigger";
|
||||
Picasso.get().load(link).into(pb_image);
|
||||
|
||||
final String mediaLink[] = new String[]{user.getImageLink()};
|
||||
pb_image.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent image = new Intent(ui.get(), ImageDetail.class);
|
||||
image.putExtra("link", mediaLink);
|
||||
ui.get().startActivity(image);
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
case WRITE_DATA:
|
||||
@ -138,7 +151,14 @@ public class ProfileEditor extends AsyncTask<Integer, Void, Integer> {
|
||||
|
||||
case ERROR:
|
||||
ErrorHandling.printError(ui.get(), err);
|
||||
ui.get().finish();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCancelled() {
|
||||
popup.dismiss();
|
||||
}
|
||||
}
|
@ -323,7 +323,7 @@ public class ProfileLoader extends AsyncTask<Long, Long, Long> {
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCancelled(Long mode) {
|
||||
protected void onCancelled() {
|
||||
if (ui.get() == null) return;
|
||||
|
||||
SwipeRefreshLayout homeReload = ui.get().findViewById(R.id.hometweets);
|
||||
|
@ -234,7 +234,7 @@ public class StatusLoader extends AsyncTask<Long, Void, Long> {
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCancelled(Long l) {
|
||||
protected void onCancelled() {
|
||||
if (ui.get() == null) return;
|
||||
|
||||
SwipeRefreshLayout ansReload = ui.get().findViewById(R.id.answer_reload);
|
||||
|
@ -113,7 +113,7 @@ public class StatusUpload extends AsyncTask<String, Void, Boolean> {
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCancelled(Boolean b) {
|
||||
protected void onCancelled() {
|
||||
popup.dismiss();
|
||||
}
|
||||
}
|
@ -105,7 +105,7 @@ public class TwitterSearch extends AsyncTask<String, Integer, Boolean> {
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCancelled(Boolean b) {
|
||||
protected void onCancelled() {
|
||||
if (ui.get() == null) return;
|
||||
|
||||
SwipeRefreshLayout tweetReload = ui.get().findViewById(R.id.searchtweets);
|
||||
|
@ -80,7 +80,7 @@ public class UserLists extends AsyncTask<Long, Void, Boolean> {
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCancelled(Boolean b) {
|
||||
protected void onCancelled() {
|
||||
if (ui.get() == null) return;
|
||||
|
||||
SwipeRefreshLayout refresh = ui.get().findViewById(R.id.user_refresh);
|
||||
|
@ -22,12 +22,10 @@ public class Tweet {
|
||||
|
||||
private final int retweetCount;
|
||||
private final int favoriteCount;
|
||||
|
||||
private final long myRetweetId;
|
||||
private boolean retweeted;
|
||||
private boolean favored;
|
||||
|
||||
private final long myRetweetId;
|
||||
|
||||
|
||||
public Tweet(Status status) {
|
||||
tweetID = status.getId();
|
||||
|
@ -94,7 +94,7 @@ public class DatabaseAdapter {
|
||||
/**
|
||||
* store user favors
|
||||
*
|
||||
* @param fav tweet favored by user
|
||||
* @param fav tweet favored by user
|
||||
* @param ownerId user ID
|
||||
*/
|
||||
public void storeUserFavs(List<Tweet> fav, long ownerId) {
|
||||
|
@ -9,7 +9,7 @@
|
||||
<string name="follow">folgen</string>
|
||||
<string name="retry">wiederholen</string>
|
||||
<string name="cancel">abbrechen</string>
|
||||
<string name="color_settings">Farb einstellungen</string>
|
||||
<string name="color_settings">Farbeinstellungen</string>
|
||||
<string name="data_load">Datenverbrauch</string>
|
||||
<string name="trend_setting">Trendeinstellung</string>
|
||||
<string name="database">Datenbank</string>
|
||||
@ -102,8 +102,9 @@
|
||||
<string name="loading">lädt..</string>
|
||||
<string name="profile_location">Standort</string>
|
||||
<string name="profile_bio">Bio</string>
|
||||
<string name="edit_profile">Profile bearbeiten</string>
|
||||
<string name="edit_profile">Profil bearbeiten</string>
|
||||
<string name="edit_save">speichern</string>
|
||||
<string name="profile_updated">Profile aktualisiert!</string>
|
||||
<string name="edit_empty_name">Name leer!</string>
|
||||
<string name="upload_button">hochladen</string>
|
||||
</resources>
|
@ -21,7 +21,7 @@
|
||||
<string name="follow">follow</string>
|
||||
<string name="retry">retry</string>
|
||||
<string name="cancel">cancel!</string>
|
||||
<string name="color_settings">Color Settings</string>
|
||||
<string name="color_settings">Color settings</string>
|
||||
<string name="followback">follows you</string>
|
||||
<string name="data_load">data consumption</string>
|
||||
<string name="trend_setting">trend setting</string>
|
||||
@ -114,5 +114,5 @@
|
||||
<string name="edit_save">save</string>
|
||||
<string name="profile_updated">Profile updated!</string>
|
||||
<string name="edit_empty_name">Empty user name!</string>
|
||||
<string name="upload_button">Upload Button</string>
|
||||
<string name="upload_button">upload</string>
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user