mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-02-07 06:23:48 +01:00
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>
|
||||
<option name="distributionType" value="LOCAL" />
|
||||
<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">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
|
@ -33,7 +33,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
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.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.vectordrawable:vectordrawable:1.0.1'
|
||||
|
@ -24,7 +24,7 @@ import org.nuclearfog.twidda.window.MediaViewer;
|
||||
import org.nuclearfog.twidda.window.UserProfile;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Date;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import twitter4j.TwitterException;
|
||||
|
||||
@ -166,7 +166,7 @@ public class ProfileLoader extends AsyncTask<Long, TwitterUser, TwitterUser> {
|
||||
if (profile_head.getVisibility() != VISIBLE) {
|
||||
profile_head.setVisibility(VISIBLE);
|
||||
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);
|
||||
}
|
||||
if (user.isVerified()) {
|
||||
|
@ -29,6 +29,7 @@ import org.nuclearfog.twidda.window.TweetDetail;
|
||||
import org.nuclearfog.twidda.window.UserProfile;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import twitter4j.TwitterException;
|
||||
|
||||
@ -152,7 +153,7 @@ public class StatusLoader extends AsyncTask<Long, Tweet, Tweet> {
|
||||
} else {
|
||||
tweetText.setVisibility(GONE);
|
||||
}
|
||||
tweetDate.setText(settings.getDateFormatter().format(tweet.getTime()));
|
||||
tweetDate.setText(SimpleDateFormat.getDateTimeInstance().format(tweet.getTime()));
|
||||
tweetDate.setTextColor(settings.getFontColor());
|
||||
tweet_api.setText(R.string.sent_from);
|
||||
tweet_api.append(tweet.getSource());
|
||||
|
@ -386,10 +386,9 @@ public class DatabaseAdapter {
|
||||
*/
|
||||
public void removeStatus(long tweetId) {
|
||||
SQLiteDatabase db = getDbWrite();
|
||||
final String[] delTwt = {Long.toString(tweetId)};
|
||||
final String[] delFav = {Long.toString(tweetId), Long.toString(homeId)};
|
||||
db.delete("tweet", "tweetID=?", delTwt);
|
||||
db.delete("favorit", "tweetID=? AND ownerID=?", delFav);
|
||||
final String[] args = {Long.toString(tweetId)};
|
||||
db.delete("tweet", "tweetID=?", args);
|
||||
db.delete("favorit", "tweetID=?", args);
|
||||
commit(db);
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@ import android.content.SharedPreferences.Editor;
|
||||
import java.net.Authenticator;
|
||||
import java.net.PasswordAuthentication;
|
||||
import java.text.NumberFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Locale;
|
||||
|
||||
import static android.content.Context.MODE_PRIVATE;
|
||||
|
||||
@ -18,7 +16,6 @@ public class GlobalSettings {
|
||||
private static GlobalSettings ourInstance;
|
||||
|
||||
private SharedPreferences settings;
|
||||
private SimpleDateFormat sdf;
|
||||
private NumberFormat formatter;
|
||||
private String key1, key2;
|
||||
private boolean loadImage;
|
||||
@ -57,7 +54,6 @@ public class GlobalSettings {
|
||||
proxyPort = settings.getString("proxy_port", "");
|
||||
proxyUser = settings.getString("proxy_user", "");
|
||||
proxyPass = settings.getString("proxy_pass", "");
|
||||
sdf = new SimpleDateFormat("dd.MM.yyyy, HH:mm:ss", Locale.getDefault());
|
||||
formatter = NumberFormat.getIntegerInstance();
|
||||
configureProxy();
|
||||
}
|
||||
@ -342,7 +338,7 @@ public class GlobalSettings {
|
||||
*/
|
||||
public void setProxyLogin(String proxyUser, String proxyPass) {
|
||||
Editor edit = settings.edit();
|
||||
if (proxyUser.trim().isEmpty()) {
|
||||
if (proxyUser.trim().isEmpty() || proxyHost.trim().isEmpty()) {
|
||||
this.proxyUser = "";
|
||||
this.proxyPass = "";
|
||||
edit.putString("proxy_user", "");
|
||||
@ -395,15 +391,6 @@ public class GlobalSettings {
|
||||
return userId;
|
||||
}
|
||||
|
||||
/**
|
||||
* get Datetime Formatter for the current location
|
||||
*
|
||||
* @return Datetime Formatter
|
||||
*/
|
||||
public SimpleDateFormat getDateFormatter() {
|
||||
return sdf;
|
||||
}
|
||||
|
||||
/**
|
||||
* get locale specific number formatter
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user