Skip to content

Commit

Permalink
version 1.8.8 removed old API keys
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearfog committed Jan 13, 2021
1 parent 9aed5a4 commit 7190554
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 31 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ apply plugin: 'com.android.application'
apply plugin: 'io.michaelrocks.paranoid'

android {
buildToolsVersion '30.0.2'
buildToolsVersion '30.0.3'
compileSdkVersion 30

defaultConfig {
applicationId 'org.nuclearfog.twidda'
minSdkVersion 16
targetSdkVersion 30
versionCode 31
versionName '1.8.7'
versionCode 32
versionName '1.8.8'
// limiting language support for smaller APK size
resConfigs 'en', 'de-rDE'
vectorDrawables.useSupportLibrary true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public void onTagClick(String tag) {
* @param tag link string
*/
@Override
public void onLinkClick(String tag) {
public void onLinkClick(final String tag) {
String shortLink = tag;
int cut = shortLink.indexOf('?');
if (cut > 0) {
Expand All @@ -415,8 +415,8 @@ public void onLinkClick(String tag) {
startActivity(intent);
} else {
// open link in a browser
Uri link = Uri.parse(tag);
Intent intent = new Intent(Intent.ACTION_VIEW, link);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(tag));
try {
startActivity(intent);
} catch (ActivityNotFoundException err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ public void onTagClick(String text) {


@Override
public void onLinkClick(String tag) {
public void onLinkClick(final String tag) {
String shortLink;
// remove query from link if exists
int cut = tag.indexOf('?');
Expand All @@ -423,11 +423,10 @@ public void onLinkClick(String tag) {
intent.putExtra(KEY_TWEET_ID, id);
intent.putExtra(KEY_TWEET_NAME, name);
startActivity(intent);
}
// open link in browser
else {
Uri link = Uri.parse(tag);
Intent intent = new Intent(Intent.ACTION_VIEW, link);
} else {
// open link in browser
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(tag));
try {
startActivity(intent);
} catch (ActivityNotFoundException err) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.LinkedList;
import java.util.List;

import io.michaelrocks.paranoid.Obfuscate;
import twitter4j.DirectMessage;
import twitter4j.GeoLocation;
import twitter4j.IDs;
Expand All @@ -51,6 +52,7 @@
/**
* Backend for twitter API.
*/
@Obfuscate
public class TwitterEngine {

private GlobalSettings settings;
Expand All @@ -77,8 +79,8 @@ private void initTwitter() {
builder.setOAuthConsumerKey(settings.getConsumerKey());
builder.setOAuthConsumerSecret(settings.getConsumerSecret());
} else {
builder.setOAuthConsumerKey(Constants.TWITTER_CONSUMER_KEY);
builder.setOAuthConsumerSecret(Constants.TWITTER_CONSUMER_SECRET);
builder.setOAuthConsumerKey("");
builder.setOAuthConsumerSecret("");
}
// Twitter4J has its own proxy settings
if (settings.isProxyEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void onTagClick(String tag) {


@Override
public void onLinkClick(String tag) {
public void onLinkClick(final String tag) {
String shortLink = tag;
int cut = shortLink.indexOf('?');
if (cut > 0) {
Expand All @@ -111,8 +111,8 @@ public void onLinkClick(String tag) {
intent.putExtra(KEY_TWEET_NAME, name);
startActivity(intent);
} else {
Uri link = Uri.parse(tag);
Intent intent = new Intent(Intent.ACTION_VIEW, link);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(tag));
try {
startActivity(intent);
} catch (ActivityNotFoundException err) {
Expand Down

0 comments on commit 7190554

Please sign in to comment.