mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-02-03 12:37:33 +01:00
Bugfix
Cleanup
This commit is contained in:
parent
0e9c3cd487
commit
5a3d661f9a
@ -66,6 +66,7 @@ public class MainActivity extends AppCompatActivity implements
|
||||
startActivityForResult(i,REQCODE);
|
||||
} else {
|
||||
login();
|
||||
setTabContent();
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,6 +76,7 @@ public class MainActivity extends AppCompatActivity implements
|
||||
if(reqCode == REQCODE) {
|
||||
if(returnCode == RESULT_OK) {
|
||||
login();
|
||||
setTabContent();
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
@ -312,8 +314,6 @@ public class MainActivity extends AppCompatActivity implements
|
||||
timelineReload.setOnRefreshListener(this);
|
||||
trendReload.setOnRefreshListener(this);
|
||||
mentionReload.setOnRefreshListener(this);
|
||||
|
||||
setTabContent();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -80,7 +80,7 @@ public class StatusLoader extends AsyncTask<Long, Void, Long> implements View.On
|
||||
try {
|
||||
Tweet tweet = mTwitter.getStatus(tweetID);
|
||||
if(tweet.embedded != null) {
|
||||
retweeter = "Retweet "+tweet.user.screenname;
|
||||
retweeter = tweet.user.screenname;
|
||||
retweeterID = tweet.user.userID;
|
||||
tweet = tweet.embedded;
|
||||
tweetID = tweet.tweetID;
|
||||
@ -203,7 +203,8 @@ public class StatusLoader extends AsyncTask<Long, Void, Long> implements View.On
|
||||
replyName.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if(rtFlag) {
|
||||
userRetweet.setText(retweeter);
|
||||
String retPrompt = "Retweet "+retweeter;
|
||||
userRetweet.setText(retPrompt);
|
||||
userRetweet.setOnClickListener(this);
|
||||
userRetweet.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ import twitter4j.conf.ConfigurationBuilder;
|
||||
public class TwitterEngine {
|
||||
|
||||
private final String TWITTER_CONSUMER_KEY = "1JwXJbVrvGWrc9SSKPnnEWslJ";
|
||||
private final String TWITTER_CONSUMER_SECRET = "4SNMCHbg68LM14X2wYDjWkmzuNqq5dnB7tfAj2b4Muu8uPQ2QE";
|
||||
private final String TWITTER_CONSUMER_SECRET = "xxx";//TODO
|
||||
|
||||
private static TwitterEngine mTwitter;
|
||||
private static long twitterID = -1L;
|
||||
|
@ -68,7 +68,7 @@ public class TimelineRecycler extends Adapter<TimelineRecycler.ItemHolder> imple
|
||||
@Override
|
||||
public ItemHolder onCreateViewHolder(ViewGroup parent, int index) {
|
||||
this.parent = parent;
|
||||
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.tweet, parent,false);
|
||||
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_tweet, parent,false);
|
||||
v.setOnClickListener(this);
|
||||
return new ItemHolder(v);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public class TrendRecycler extends RecyclerView.Adapter<TrendRecycler.ItemHolder
|
||||
@Override
|
||||
public ItemHolder onCreateViewHolder(ViewGroup parent, int index) {
|
||||
this.parent = parent;
|
||||
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.trend, parent,false);
|
||||
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_trend, parent,false);
|
||||
v.setOnClickListener(this);
|
||||
return new ItemHolder(v);
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public class UserRecycler extends RecyclerView.Adapter<UserRecycler.ItemHolder>
|
||||
@Override
|
||||
public ItemHolder onCreateViewHolder(ViewGroup parent, int index) {
|
||||
this.parent = parent;
|
||||
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.useritem, parent,false);
|
||||
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_user, parent,false);
|
||||
v.setOnClickListener(this);
|
||||
return new ItemHolder(v);
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ public class AppSettings extends AppCompatActivity implements View.OnClickListen
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInst) {
|
||||
super.onCreate(savedInst);
|
||||
setContentView(R.layout.settings);
|
||||
setContentView(R.layout.settingpage);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_setting);
|
||||
setSupportActionBar(toolbar);
|
||||
if(getSupportActionBar() != null)
|
||||
|
@ -17,7 +17,7 @@ public class LoginPage extends Activity implements View.OnClickListener {
|
||||
@Override
|
||||
protected void onCreate(Bundle b){
|
||||
super.onCreate(b);
|
||||
setContentView(R.layout.login);
|
||||
setContentView(R.layout.loginpage);
|
||||
pin = findViewById(R.id.pin);
|
||||
findViewById(R.id.linkButton).setOnClickListener(this);
|
||||
findViewById(R.id.get).setOnClickListener(this);
|
||||
|
@ -36,7 +36,7 @@ public class SearchPage extends AppCompatActivity implements UserRecycler.OnItem
|
||||
@Override
|
||||
protected void onCreate(Bundle b) {
|
||||
super.onCreate(b);
|
||||
setContentView(R.layout.search);
|
||||
setContentView(R.layout.searchpage);
|
||||
getExtras(getIntent().getExtras());
|
||||
int background = ColorPreferences.getInstance(this).getColor(ColorPreferences.BACKGROUND);
|
||||
|
||||
|
@ -39,7 +39,7 @@ public class TweetDetail extends AppCompatActivity implements View.OnClickListen
|
||||
@Override
|
||||
protected void onCreate(Bundle b) {
|
||||
super.onCreate(b);
|
||||
setContentView(R.layout.tweet_detail);
|
||||
setContentView(R.layout.tweetpage);
|
||||
getExtras(getIntent().getExtras());
|
||||
|
||||
boolean home = userID == TwitterEngine.getHomeId();
|
||||
|
@ -30,7 +30,7 @@ public class UserDetail extends AppCompatActivity implements UserRecycler.OnItem
|
||||
@Override
|
||||
protected void onCreate(Bundle b) {
|
||||
super.onCreate(b);
|
||||
setContentView(R.layout.user);
|
||||
setContentView(R.layout.userpage);
|
||||
getExtras(getIntent().getExtras());
|
||||
|
||||
userList = (RecyclerView) findViewById(R.id.userlist);
|
||||
|
@ -45,7 +45,7 @@ public class UserProfile extends AppCompatActivity implements View.OnClickListen
|
||||
@Override
|
||||
protected void onCreate(Bundle b) {
|
||||
super.onCreate(b);
|
||||
setContentView(R.layout.profile);
|
||||
setContentView(R.layout.profilepage);
|
||||
Toolbar tool = (Toolbar) findViewById(R.id.profile_toolbar);
|
||||
setSupportActionBar(tool);
|
||||
if(getSupportActionBar() != null)
|
||||
|
@ -16,6 +16,7 @@
|
||||
android:id="@+id/tweetPb"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:contentDescription="@string/profile_image" />
|
||||
|
||||
<LinearLayout
|
||||
@ -85,7 +86,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/retweeter"
|
||||
android:layout_width="150dp"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:singleLine="true"
|
Loading…
x
Reference in New Issue
Block a user