fixed twitlonger extension package name

fixed text count
This commit is contained in:
Mariotaku Lee 2016-03-27 23:35:55 +08:00
parent e6c432ec26
commit fb9969f98b
4 changed files with 3 additions and 12 deletions

View File

@ -22,7 +22,7 @@ apply plugin: 'com.neenbedankt.android-apt'
android {
defaultConfig {
applicationId "org.mariotaku.extension.twitlonger"
applicationId "org.mariotaku.twidere.extension.twitlonger"
minSdkVersion 14
targetSdkVersion 23
versionCode 7

View File

@ -1423,7 +1423,7 @@ public class ComposeActivity extends BaseActivity implements OnMenuItemClickList
} else if (!hasMedia && (TextUtils.isEmpty(text) || noReplyContent(text))) {
mEditText.setError(getString(R.string.error_message_no_content));
return;
} else if (!mStatusShortenerUsed && tweetLength > maxLength) {
} else if (maxLength <= 0 || (!mStatusShortenerUsed && tweetLength > maxLength)) {
mEditText.setError(getString(R.string.error_message_status_too_long));
final int textLength = mEditText.length();
mEditText.setSelection(textLength - (tweetLength - maxLength), textLength);

View File

@ -66,11 +66,6 @@ public class ReadStateManager implements Constants {
return pairs;
}
public long getPosition(final String key, final long keyId) {
return getPosition(key, String.valueOf(keyId));
}
public long getPosition(final String key, final String keyId) {
if (TextUtils.isEmpty(key)) return -1;
final Set<String> set = mPreferences.getStringSet(key, null);
@ -95,10 +90,6 @@ public class ReadStateManager implements Constants {
}
public boolean setPosition(final String key, final long keyId, final long position, boolean acceptOlder) {
return setPosition(key, String.valueOf(keyId), position, acceptOlder);
}
public boolean setPosition(final String key, final String keyId, final long position, boolean acceptOlder) {
if (TextUtils.isEmpty(key)) return false;
Set<String> set = mPreferences.getStringSet(key, null);

View File

@ -82,7 +82,7 @@ public class StatusTextCountView extends AppCompatTextView {
}
public void updateTextCount() {
if (mMaxLength < 0) {
if (mMaxLength <= 0) {
setText(null);
return;
}