bug fix, dependency update
This commit is contained in:
parent
07def23808
commit
ecf0898326
2
.idea/gradle.xml
generated
2
.idea/gradle.xml
generated
@ -5,7 +5,7 @@
|
|||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
<option name="distributionType" value="LOCAL" />
|
<option name="distributionType" value="LOCAL" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
<option name="gradleHome" value="/opt/Gradle/gradle-5.2.1" />
|
<option name="gradleHome" value="/opt/Gradle/gradle-5.4" />
|
||||||
<option name="modules">
|
<option name="modules">
|
||||||
<set>
|
<set>
|
||||||
<option value="$PROJECT_DIR$" />
|
<option value="$PROJECT_DIR$" />
|
||||||
|
@ -33,7 +33,7 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.google.android.material:material:1.0.0'
|
implementation 'com.google.android.material:material:1.0.0'
|
||||||
implementation 'androidx.appcompat:appcompat:1.1.0-alpha05'
|
implementation 'androidx.appcompat:appcompat:1.1.0-beta01'
|
||||||
implementation 'androidx.exifinterface:exifinterface:1.0.0'
|
implementation 'androidx.exifinterface:exifinterface:1.0.0'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.vectordrawable:vectordrawable:1.0.1'
|
implementation 'androidx.vectordrawable:vectordrawable:1.0.1'
|
||||||
|
@ -24,7 +24,7 @@ import org.nuclearfog.twidda.window.MediaViewer;
|
|||||||
import org.nuclearfog.twidda.window.UserProfile;
|
import org.nuclearfog.twidda.window.UserProfile;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.Date;
|
import java.text.SimpleDateFormat;
|
||||||
|
|
||||||
import twitter4j.TwitterException;
|
import twitter4j.TwitterException;
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ public class ProfileLoader extends AsyncTask<Long, TwitterUser, TwitterUser> {
|
|||||||
if (profile_head.getVisibility() != VISIBLE) {
|
if (profile_head.getVisibility() != VISIBLE) {
|
||||||
profile_head.setVisibility(VISIBLE);
|
profile_head.setVisibility(VISIBLE);
|
||||||
TextView txtCreated = ui.get().findViewById(R.id.profile_date);
|
TextView txtCreated = ui.get().findViewById(R.id.profile_date);
|
||||||
String date = settings.getDateFormatter().format(new Date(user.getCreatedAt()));
|
String date = SimpleDateFormat.getDateTimeInstance().format(user.getCreatedAt());
|
||||||
txtCreated.setText(date);
|
txtCreated.setText(date);
|
||||||
}
|
}
|
||||||
if (user.isVerified()) {
|
if (user.isVerified()) {
|
||||||
|
@ -29,6 +29,7 @@ import org.nuclearfog.twidda.window.TweetDetail;
|
|||||||
import org.nuclearfog.twidda.window.UserProfile;
|
import org.nuclearfog.twidda.window.UserProfile;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
|
||||||
import twitter4j.TwitterException;
|
import twitter4j.TwitterException;
|
||||||
|
|
||||||
@ -152,7 +153,7 @@ public class StatusLoader extends AsyncTask<Long, Tweet, Tweet> {
|
|||||||
} else {
|
} else {
|
||||||
tweetText.setVisibility(GONE);
|
tweetText.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
tweetDate.setText(settings.getDateFormatter().format(tweet.getTime()));
|
tweetDate.setText(SimpleDateFormat.getDateTimeInstance().format(tweet.getTime()));
|
||||||
tweetDate.setTextColor(settings.getFontColor());
|
tweetDate.setTextColor(settings.getFontColor());
|
||||||
tweet_api.setText(R.string.sent_from);
|
tweet_api.setText(R.string.sent_from);
|
||||||
tweet_api.append(tweet.getSource());
|
tweet_api.append(tweet.getSource());
|
||||||
|
@ -386,10 +386,9 @@ public class DatabaseAdapter {
|
|||||||
*/
|
*/
|
||||||
public void removeStatus(long tweetId) {
|
public void removeStatus(long tweetId) {
|
||||||
SQLiteDatabase db = getDbWrite();
|
SQLiteDatabase db = getDbWrite();
|
||||||
final String[] delTwt = {Long.toString(tweetId)};
|
final String[] args = {Long.toString(tweetId)};
|
||||||
final String[] delFav = {Long.toString(tweetId), Long.toString(homeId)};
|
db.delete("tweet", "tweetID=?", args);
|
||||||
db.delete("tweet", "tweetID=?", delTwt);
|
db.delete("favorit", "tweetID=?", args);
|
||||||
db.delete("favorit", "tweetID=? AND ownerID=?", delFav);
|
|
||||||
commit(db);
|
commit(db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,8 +7,6 @@ import android.content.SharedPreferences.Editor;
|
|||||||
import java.net.Authenticator;
|
import java.net.Authenticator;
|
||||||
import java.net.PasswordAuthentication;
|
import java.net.PasswordAuthentication;
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
import static android.content.Context.MODE_PRIVATE;
|
import static android.content.Context.MODE_PRIVATE;
|
||||||
|
|
||||||
@ -18,7 +16,6 @@ public class GlobalSettings {
|
|||||||
private static GlobalSettings ourInstance;
|
private static GlobalSettings ourInstance;
|
||||||
|
|
||||||
private SharedPreferences settings;
|
private SharedPreferences settings;
|
||||||
private SimpleDateFormat sdf;
|
|
||||||
private NumberFormat formatter;
|
private NumberFormat formatter;
|
||||||
private String key1, key2;
|
private String key1, key2;
|
||||||
private boolean loadImage;
|
private boolean loadImage;
|
||||||
@ -57,7 +54,6 @@ public class GlobalSettings {
|
|||||||
proxyPort = settings.getString("proxy_port", "");
|
proxyPort = settings.getString("proxy_port", "");
|
||||||
proxyUser = settings.getString("proxy_user", "");
|
proxyUser = settings.getString("proxy_user", "");
|
||||||
proxyPass = settings.getString("proxy_pass", "");
|
proxyPass = settings.getString("proxy_pass", "");
|
||||||
sdf = new SimpleDateFormat("dd.MM.yyyy, HH:mm:ss", Locale.getDefault());
|
|
||||||
formatter = NumberFormat.getIntegerInstance();
|
formatter = NumberFormat.getIntegerInstance();
|
||||||
configureProxy();
|
configureProxy();
|
||||||
}
|
}
|
||||||
@ -342,7 +338,7 @@ public class GlobalSettings {
|
|||||||
*/
|
*/
|
||||||
public void setProxyLogin(String proxyUser, String proxyPass) {
|
public void setProxyLogin(String proxyUser, String proxyPass) {
|
||||||
Editor edit = settings.edit();
|
Editor edit = settings.edit();
|
||||||
if (proxyUser.trim().isEmpty()) {
|
if (proxyUser.trim().isEmpty() || proxyHost.trim().isEmpty()) {
|
||||||
this.proxyUser = "";
|
this.proxyUser = "";
|
||||||
this.proxyPass = "";
|
this.proxyPass = "";
|
||||||
edit.putString("proxy_user", "");
|
edit.putString("proxy_user", "");
|
||||||
@ -395,15 +391,6 @@ public class GlobalSettings {
|
|||||||
return userId;
|
return userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* get Datetime Formatter for the current location
|
|
||||||
*
|
|
||||||
* @return Datetime Formatter
|
|
||||||
*/
|
|
||||||
public SimpleDateFormat getDateFormatter() {
|
|
||||||
return sdf;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get locale specific number formatter
|
* get locale specific number formatter
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user