Merge pull request #132 from YixiaoLi/master

Fixed twitter status link handler, tested with Chrome.
This commit is contained in:
Mariotaku 2015-04-25 17:05:53 +08:00
commit 05ef4cf640
2 changed files with 15 additions and 7 deletions

View File

@ -541,22 +541,28 @@
<intent-filter>
<data
android:host="twitter.com"
android:scheme="http"/>
android:scheme="http"
android:pathPrefix="/"/>
<data
android:host="twitter.com"
android:scheme="https"/>
android:scheme="https"
android:pathPrefix="/"/>
<data
android:host="www.twitter.com"
android:scheme="http"/>
android:scheme="http"
android:pathPrefix="/"/>
<data
android:host="www.twitter.com"
android:scheme="https"/>
android:scheme="https"
android:pathPrefix="/"/>
<data
android:host="mobile.twitter.com"
android:scheme="http"/>
android:scheme="http"
android:pathPrefix="/"/>
<data
android:host="mobile.twitter.com"
android:scheme="https"/>
android:scheme="https"
android:pathPrefix="/"/>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>

View File

@ -1700,7 +1700,9 @@ public final class Utils implements Constants, TwitterConstants {
public static long getDefaultAccountId(final Context context) {
if (context == null) return -1;
final SharedPreferences prefs = context.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE);
return prefs.getLong(KEY_DEFAULT_ACCOUNT_ID, -1);
long account_id = prefs.getLong(KEY_DEFAULT_ACCOUNT_ID, -1);
if (account_id == -1) account_id = Utils.getAccountIds(context)[0]; /* TODO: this is just a quick fix */
return account_id;
}
public static String getDefaultAccountScreenName(final Context context) {