diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1515391b..63f10fe8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -120,7 +120,7 @@ android:windowSoftInputMode="stateHidden" /> diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/UserProfile.java b/app/src/main/java/org/nuclearfog/twidda/activities/UserProfile.java index 2d2ab1d4..3b39b65a 100644 --- a/app/src/main/java/org/nuclearfog/twidda/activities/UserProfile.java +++ b/app/src/main/java/org/nuclearfog/twidda/activities/UserProfile.java @@ -16,7 +16,7 @@ import static org.nuclearfog.twidda.activities.UserDetail.KEY_USERDETAIL_ID; import static org.nuclearfog.twidda.activities.UserDetail.KEY_USERDETAIL_MODE; import static org.nuclearfog.twidda.activities.UserDetail.USERLIST_FOLLOWER; import static org.nuclearfog.twidda.activities.UserDetail.USERLIST_FRIENDS; -import static org.nuclearfog.twidda.activities.UserLists.KEY_USERLIST_OWNER_ID; +import static org.nuclearfog.twidda.activities.Userlists.KEY_USERLIST_OWNER_ID; import static org.nuclearfog.twidda.backend.UserAction.Action.ACTION_BLOCK; import static org.nuclearfog.twidda.backend.UserAction.Action.ACTION_FOLLOW; import static org.nuclearfog.twidda.backend.UserAction.Action.ACTION_MUTE; @@ -406,7 +406,7 @@ public class UserProfile extends AppCompatActivity implements OnClickListener, O } // open users list else if (item.getItemId() == R.id.profile_lists) { - Intent listPage = new Intent(this, UserLists.class); + Intent listPage = new Intent(this, Userlists.class); listPage.putExtra(KEY_USERLIST_OWNER_ID, user.getId()); startActivity(listPage); } diff --git a/app/src/main/java/org/nuclearfog/twidda/activities/UserLists.java b/app/src/main/java/org/nuclearfog/twidda/activities/Userlists.java similarity index 98% rename from app/src/main/java/org/nuclearfog/twidda/activities/UserLists.java rename to app/src/main/java/org/nuclearfog/twidda/activities/Userlists.java index c53c1b80..73b9950c 100644 --- a/app/src/main/java/org/nuclearfog/twidda/activities/UserLists.java +++ b/app/src/main/java/org/nuclearfog/twidda/activities/Userlists.java @@ -25,7 +25,7 @@ import org.nuclearfog.twidda.database.GlobalSettings; * * @author nuclearfog */ -public class UserLists extends AppCompatActivity implements TabLayout.OnTabSelectedListener { +public class Userlists extends AppCompatActivity implements TabLayout.OnTabSelectedListener { /** * Key for the ID the list owner diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/LinkLoader.java b/app/src/main/java/org/nuclearfog/twidda/backend/LinkLoader.java index b8436236..db9bed33 100644 --- a/app/src/main/java/org/nuclearfog/twidda/backend/LinkLoader.java +++ b/app/src/main/java/org/nuclearfog/twidda/backend/LinkLoader.java @@ -4,7 +4,7 @@ import static org.nuclearfog.twidda.activities.SearchPage.KEY_SEARCH_QUERY; import static org.nuclearfog.twidda.activities.TweetActivity.KEY_TWEET_ID; import static org.nuclearfog.twidda.activities.TweetActivity.KEY_TWEET_NAME; import static org.nuclearfog.twidda.activities.TweetEditor.KEY_TWEETPOPUP_TEXT; -import static org.nuclearfog.twidda.activities.UserLists.KEY_USERLIST_OWNER_NAME; +import static org.nuclearfog.twidda.activities.Userlists.KEY_USERLIST_OWNER_NAME; import static org.nuclearfog.twidda.activities.UserProfile.KEY_PROFILE_DATA; import static org.nuclearfog.twidda.activities.UserProfile.KEY_PROFILE_DISABLE_RELOAD; import static org.nuclearfog.twidda.activities.UserlistActivity.KEY_LIST_ID; @@ -21,7 +21,7 @@ import org.nuclearfog.twidda.activities.MainActivity; import org.nuclearfog.twidda.activities.SearchPage; import org.nuclearfog.twidda.activities.TweetActivity; import org.nuclearfog.twidda.activities.TweetEditor; -import org.nuclearfog.twidda.activities.UserLists; +import org.nuclearfog.twidda.activities.Userlists; import org.nuclearfog.twidda.activities.UserProfile; import org.nuclearfog.twidda.activities.UserlistActivity; import org.nuclearfog.twidda.backend.api.Twitter; @@ -147,7 +147,7 @@ public class LinkLoader extends AsyncTask { // show userlists else if (USERLISTS_PATH.matcher(path).matches()) { data.putString(KEY_USERLIST_OWNER_NAME, username); - dataHolder = new DataHolder(data, UserLists.class); + dataHolder = new DataHolder(data, Userlists.class); } } } diff --git a/app/src/main/java/org/nuclearfog/twidda/database/TweetImpl.java b/app/src/main/java/org/nuclearfog/twidda/database/TweetImpl.java index 342931c0..90462921 100644 --- a/app/src/main/java/org/nuclearfog/twidda/database/TweetImpl.java +++ b/app/src/main/java/org/nuclearfog/twidda/database/TweetImpl.java @@ -48,7 +48,7 @@ class TweetImpl implements Tweet { private String text; private String source; private String userMentions; - private String[] mediaLinks; + private String[] mediaLinks = {}; private boolean retweeted; private boolean favorited; private boolean sensitive; @@ -74,8 +74,9 @@ class TweetImpl implements Tweet { favorited = (tweetRegister & FAV_MASK) != 0; retweeted = (tweetRegister & RTW_MASK) != 0; sensitive = (tweetRegister & MEDIA_SENS_MASK) != 0; - mediaLinks = SEPARATOR.split(linkStr); - userMentions = StringTools.getUserMentions(text, ""); + if (!linkStr.isEmpty()) + mediaLinks = SEPARATOR.split(linkStr); + userMentions = StringTools.getUserMentions(text, author.getScreenname()); // get media type if ((tweetRegister & MEDIA_ANGIF_MASK) == MEDIA_ANGIF_MASK) { mediaType = MEDIA_GIF; diff --git a/app/src/main/res/layout/page_list.xml b/app/src/main/res/layout/page_list.xml index 1f8afced..f8ddae62 100644 --- a/app/src/main/res/layout/page_list.xml +++ b/app/src/main/res/layout/page_list.xml @@ -6,7 +6,7 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".activities.UserLists"> + tools:context=".activities.Userlists">