This commit is contained in:
NudeDude 2019-04-04 21:42:26 +02:00
parent 50778eaec6
commit f39a03107a
10 changed files with 13 additions and 16 deletions

View File

@ -368,7 +368,7 @@ public class MainActivity extends AppCompatActivity implements OnRefreshListener
Intent intent = new Intent(this, TweetDetail.class);
intent.putExtra("tweetID", tweetId);
intent.putExtra("userID", userId);
intent.putExtra("username", username.substring(1));
intent.putExtra("username", username);
startActivityForResult(intent, TWEET);
}

View File

@ -253,7 +253,7 @@ public class StatusLoader extends AsyncTask<Long, Void, Void> {
public void onClick(View v) {
Intent profile = new Intent(ui.get(), UserProfile.class);
profile.putExtra("userID", tweet.getUser().getId());
profile.putExtra("username", tweet.getUser().getUsername());
profile.putExtra("username", tweet.getUser().getScreenname());
ui.get().startActivity(profile);
}
});

View File

@ -36,7 +36,7 @@ public class Tweet {
tweet = getText(status);
time = status.getCreatedAt().getTime();
replyID = status.getInReplyToStatusId();
replyName = status.getInReplyToScreenName();
replyName = '@' + status.getInReplyToScreenName();
media = getMediaLinks(status);
retweeted = status.isRetweeted();
favored = status.isFavorited();

View File

@ -68,8 +68,6 @@ public class AppDatabase extends SQLiteOpenHelper {
}
if(oldVersion < 3 && newVersion >=3) {
db.execSQL("DROP TABLE favorit");
db.execSQL("DROP INDEX idx_tweet");
db.execSQL(favoriteTable);
db.execSQL(INDX_TWEET);

View File

@ -183,7 +183,7 @@ public class SearchPage extends AppCompatActivity implements OnRefreshListener,
Intent tweetdetail = new Intent(this, TweetDetail.class);
tweetdetail.putExtra("tweetID", tweet.getId());
tweetdetail.putExtra("userID", tweet.getUser().getId());
tweetdetail.putExtra("username", tweet.getUser().getScreenname().substring(1));
tweetdetail.putExtra("username", tweet.getUser().getScreenname());
startActivity(tweetdetail);
break;

View File

@ -184,7 +184,7 @@ public class TweetDetail extends AppCompatActivity implements OnClickListener,
case R.id.tweet_link:
if (mConnect.getActiveNetworkInfo() != null && mConnect.getActiveNetworkInfo().isConnected()) {
Intent intent = new Intent(Intent.ACTION_VIEW);
String tweetLink = "https://twitter.com/" + username + "/status/" + tweetID;
String tweetLink = "https://twitter.com/" + username.substring(1) + "/status/" + tweetID;
intent.setData(Uri.parse(tweetLink));
startActivity(intent);
} else {
@ -193,7 +193,7 @@ public class TweetDetail extends AppCompatActivity implements OnClickListener,
break;
case R.id.link_copy:
String tweetLink = "https://twitter.com/" + username + "/status/" + tweetID;
String tweetLink = "https://twitter.com/" + username.substring(1) + "/status/" + tweetID;
ClipboardManager clip = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
ClipData linkClip = ClipData.newPlainText("tweet link", tweetLink);
clip.setPrimaryClip(linkClip);
@ -242,7 +242,7 @@ public class TweetDetail extends AppCompatActivity implements OnClickListener,
case R.id.answer_button:
Intent tweet = new Intent(this, TweetPopup.class);
tweet.putExtra("TweetID", tweetID);
tweet.putExtra("Addition", '@'+username);
tweet.putExtra("Addition", username);
startActivityForResult(tweet, TWEET);
break;
}
@ -265,7 +265,7 @@ public class TweetDetail extends AppCompatActivity implements OnClickListener,
Intent intent = new Intent(this, TweetDetail.class);
intent.putExtra("tweetID", tweet.getId());
intent.putExtra("userID", tweet.getUser().getId());
intent.putExtra("username", tweet.getUser().getScreenname().substring(1));
intent.putExtra("username", tweet.getUser().getScreenname());
startActivityForResult(intent, TWEET);
}
}
@ -297,9 +297,9 @@ public class TweetDetail extends AppCompatActivity implements OnClickListener,
Matcher linkMatch = linkPattern.matcher(link);
if (linkMatch.matches()) {
if(link.startsWith("/@"))
link = link.substring(2);
else
link = link.substring(1);
else
link = '@' + link.substring(1);
int end = link.indexOf('/');
username = link.substring(0,end);

View File

@ -379,7 +379,7 @@ public class UserProfile extends AppCompatActivity implements OnRefreshListener,
Intent intent = new Intent(this, TweetDetail.class);
intent.putExtra("tweetID", tweetId);
intent.putExtra("userID", userId);
intent.putExtra("username", username.substring(1));
intent.putExtra("username", username);
startActivityForResult(intent, TWEET);
}

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"

View File

@ -43,7 +43,7 @@
<string name="blocked">geblockt!</string>
<string name="unblocked">entblockt!</string>
<string name="tweet_removed">Tweet gelöscht!</string>
<string name="answering">antwort @</string>
<string name="answering">"antwort "</string>
<string name="sent_from">"gesendet von: "</string>
<string name="progress_kill">abbrechen</string>
<string name="mute">Stummschalten</string>

View File

@ -50,7 +50,7 @@
<string name="blocked">blocked</string>
<string name="unblocked">unblocked</string>
<string name="tweet_removed">Tweet removed!</string>
<string name="answering">answering @</string>
<string name="answering">answering </string>
<string name="sent_from">sent from: </string>
<string name="progress_kill">stop loading</string>
<string name="woeid" translatable="false">World ID</string>