mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-01-01 04:17:21 +01:00
Gradle update, settings page layout fix, toString fix
This commit is contained in:
parent
7a3c8eb127
commit
48f00f905d
@ -61,7 +61,7 @@ dependencies {
|
||||
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
|
||||
implementation 'com.google.android.material:material:1.6.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
//noinspection GradleDependency
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.1.2'
|
||||
|
@ -108,7 +108,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
|
||||
private static final String TWEET_UNRETWEET = API + "1.1/statuses/unretweet/";
|
||||
private static final String TWEET_UPLOAD = API + "1.1/statuses/update.json";
|
||||
private static final String TWEET_DELETE = API + "1.1/statuses/destroy/";
|
||||
private static final String TWEET_HIDE = API + "2/tweets/";
|
||||
private static final String TWEET_UNI = API + "2/tweets/";
|
||||
private static final String TRENDS = API + "1.1/trends/place.json";
|
||||
private static final String LOCATIONS = API + "1.1/trends/available.json";
|
||||
private static final String USERLIST_SHOW = API + "1.1/lists/show.json";
|
||||
@ -178,6 +178,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
|
||||
supportTls.add(new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS).allEnabledTlsVersions().allEnabledCipherSuites().build());
|
||||
builder.connectionSpecs(supportTls);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
// ignore, try with default setting
|
||||
}
|
||||
}
|
||||
@ -511,7 +512,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
|
||||
* @return user list
|
||||
*/
|
||||
public Users getRetweetingUsers(long tweetId) throws TwitterException {
|
||||
String endpoint = API + "2/tweets/" + tweetId + "/retweeted_by";
|
||||
String endpoint = TWEET_UNI + tweetId + "/retweeted_by";
|
||||
return getUsers2(endpoint);
|
||||
}
|
||||
|
||||
@ -522,7 +523,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
|
||||
* @return user list
|
||||
*/
|
||||
public Users getLikingUsers(long tweetId) throws TwitterException {
|
||||
String endpoint = API + "2/tweets/" + tweetId + "/liking_users";
|
||||
String endpoint = TWEET_UNI + tweetId + "/liking_users";
|
||||
return getUsers2(endpoint);
|
||||
}
|
||||
|
||||
@ -857,7 +858,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
|
||||
try {
|
||||
MediaType mediaType = MediaType.parse("application/json");
|
||||
RequestBody body = RequestBody.create(mediaType, "{\"hidden\":" + hide + "}");
|
||||
Response response = put(TWEET_HIDE + tweetId + "/hidden", new ArrayList<>(2), body);
|
||||
Response response = put(TWEET_UNI + tweetId + "/hidden", new ArrayList<>(2), body);
|
||||
|
||||
if (response.body() != null && response.code() == 200) {
|
||||
JSONObject json = new JSONObject(response.body().string());
|
||||
|
@ -95,7 +95,7 @@ public class DirectmessageV1 implements DirectMessage {
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "from:" + sender + " to:" + receiver + " message:\"" + text + "\"";
|
||||
return "from=" + sender + " to=" + receiver + " message=\"" + text + "\"";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -51,6 +51,6 @@ public class LocationV1 implements Location {
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "id:" + id + " name:\"" + name + "\"";
|
||||
return "id=" + id + " name=\"" + name + "\"";
|
||||
}
|
||||
}
|
@ -72,7 +72,7 @@ public class RelationV1 implements Relation {
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "following:" + isFollowing + " follower:" + isFollower +
|
||||
" blocked:" + isBlocked + " muted:" + isMuted + " dm open:" + canDm;
|
||||
return "following=" + isFollowing + " follower=" + isFollower +
|
||||
" blocked=" + isBlocked + " muted=" + isMuted + " dm open=" + canDm;
|
||||
}
|
||||
}
|
@ -44,6 +44,6 @@ public class TrendV1 implements Trend {
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "rank:" + rank + " name:\"" + name + "\"";
|
||||
return "rank=" + rank + " name=\"" + name + "\"";
|
||||
}
|
||||
}
|
@ -255,7 +255,7 @@ public class TweetV1 implements Tweet {
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "from:\"" + author.getScreenname() + "\" text:\"" + text + "\"";
|
||||
return "from=\"" + author.getScreenname() + "\" text=\"" + text + "\"";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -109,7 +109,7 @@ public class UserListV1 implements UserList {
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "title:\"" + title + "\" description:\"" + description + "\"";
|
||||
return "title=\"" + title + "\" description=\"" + description + "\"";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -180,7 +180,7 @@ public class UserV1 implements User {
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "name:\"" + screenName + "\"";
|
||||
return "name=\"" + screenName + "\"";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -184,7 +184,7 @@ public class UserV2 implements User {
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "name:\"" + screenName + "\"";
|
||||
return "name=\"" + screenName + "\"";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -69,8 +69,8 @@ public class AccountImpl implements Account {
|
||||
@Override
|
||||
public String toString() {
|
||||
if (user != null)
|
||||
return user + " date:" + loginDate;
|
||||
return "id:" + userId + " date:" + loginDate;
|
||||
return user + " date=" + loginDate;
|
||||
return "id=" + userId + " date=" + loginDate;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -79,7 +79,7 @@ public class DirectMessageImpl implements DirectMessage {
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "from:" + sender + " to:" + receiver + " message:\"" + text + "\"";
|
||||
return "from=" + sender + " to=" + receiver + " message=\"" + text + "\"";
|
||||
}
|
||||
|
||||
public void setSender(User sender) {
|
||||
|
@ -47,6 +47,6 @@ public class LocationImpl implements Location {
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "id:" + id + " name:\"" + name + "\"";
|
||||
return "id=" + id + " name=\"" + name + "\"";
|
||||
}
|
||||
}
|
@ -43,6 +43,6 @@ public class TrendImpl implements Trend {
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "rank:" + rank + " name:\"" + name + "\"";
|
||||
return "rank=" + rank + " name=\"" + name + "\"";
|
||||
}
|
||||
}
|
@ -213,7 +213,7 @@ public class TweetImpl implements Tweet {
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "from:\"" + author.getScreenname() + "\" text:\"" + text + "\"";
|
||||
return "from=\"" + author.getScreenname() + "\" text=\"" + text + "\"";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -165,6 +165,6 @@ public class UserImpl implements User {
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "name:\"" + screenName + "\"";
|
||||
return "name=\"" + screenName + "\"";
|
||||
}
|
||||
}
|
||||
|
@ -454,7 +454,7 @@
|
||||
android:layout_marginBottom="@dimen/settings_column_margin"
|
||||
android:max="9"
|
||||
app:layout_constraintStart_toEndOf="@id/settings_list_seek_descr"
|
||||
app:layout_constraintTop_toBottomOf="@id/settings_enable_prev"
|
||||
app:layout_constraintTop_toBottomOf="@id/settings_enable_twitter_alt"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/settings_list_size" />
|
||||
|
||||
|
@ -9,7 +9,7 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.1.3'
|
||||
classpath 'com.android.tools.build:gradle:7.2.0'
|
||||
classpath 'io.michaelrocks:paranoid-gradle-plugin:0.3.7'
|
||||
classpath 'gradle.plugin.ru.cleverpumpkin.proguard-dictionaries-generator:plugin:1.0.8'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user