|
|
@ -15,7 +15,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
package com.keylesspalace.tusky; |
|
|
|
package com.keylesspalace.tusky; |
|
|
|
|
|
|
|
|
|
|
|
import android.content.res.Configuration; |
|
|
|
import android.content.Intent; |
|
|
|
|
|
|
|
import android.net.Uri; |
|
|
|
import android.os.Bundle; |
|
|
|
import android.os.Bundle; |
|
|
|
import android.support.annotation.Nullable; |
|
|
|
import android.support.annotation.Nullable; |
|
|
|
import android.support.v4.app.Fragment; |
|
|
|
import android.support.v4.app.Fragment; |
|
|
@ -26,6 +27,7 @@ import android.view.Menu; |
|
|
|
import android.view.MenuItem; |
|
|
|
import android.view.MenuItem; |
|
|
|
|
|
|
|
|
|
|
|
import com.keylesspalace.tusky.fragment.ViewThreadFragment; |
|
|
|
import com.keylesspalace.tusky.fragment.ViewThreadFragment; |
|
|
|
|
|
|
|
import com.keylesspalace.tusky.util.LinkHelper; |
|
|
|
|
|
|
|
|
|
|
|
public class ViewThreadActivity extends BaseActivity { |
|
|
|
public class ViewThreadActivity extends BaseActivity { |
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -35,11 +37,11 @@ public class ViewThreadActivity extends BaseActivity { |
|
|
|
|
|
|
|
|
|
|
|
Toolbar toolbar = findViewById(R.id.toolbar); |
|
|
|
Toolbar toolbar = findViewById(R.id.toolbar); |
|
|
|
setSupportActionBar(toolbar); |
|
|
|
setSupportActionBar(toolbar); |
|
|
|
ActionBar bar = getSupportActionBar(); |
|
|
|
ActionBar actionBar = getSupportActionBar(); |
|
|
|
if (bar != null) { |
|
|
|
if (actionBar != null) { |
|
|
|
bar.setTitle(null); |
|
|
|
actionBar.setTitle(R.string.title_view_thread); |
|
|
|
bar.setDisplayHomeAsUpEnabled(true); |
|
|
|
actionBar.setDisplayHomeAsUpEnabled(true); |
|
|
|
bar.setDisplayShowHomeEnabled(true); |
|
|
|
actionBar.setDisplayShowHomeEnabled(true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String id = getIntent().getStringExtra("id"); |
|
|
|
String id = getIntent().getStringExtra("id"); |
|
|
@ -62,14 +64,11 @@ public class ViewThreadActivity extends BaseActivity { |
|
|
|
onBackPressed(); |
|
|
|
onBackPressed(); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
case R.id.action_open_in_web: { |
|
|
|
|
|
|
|
LinkHelper.openLink(getIntent().getStringExtra("url"), this); |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return super.onOptionsItemSelected(item); |
|
|
|
return super.onOptionsItemSelected(item); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void onConfigurationChanged(Configuration newConfig) { |
|
|
|
|
|
|
|
super.onConfigurationChanged(newConfig); |
|
|
|
|
|
|
|
/* Provide a stub to ignore configuration changes so the thread isn't reloaded when the |
|
|
|
|
|
|
|
* the activity is reoriented or resized. */ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|