1.8 fixes (#637)
* fix lint warnings * upgrade dependencies * auto cancel notifications * improve dependency injection * fix tests * remove old comment from BaseActivity * fix missing injectors
This commit is contained in:
parent
26fb180d1a
commit
27b4cf8739
25 changed files with 34 additions and 135 deletions
|
|
@ -6,6 +6,6 @@ import android.text.style.ClickableSpan
|
|||
abstract class ClickableSpanNoUnderline : ClickableSpan() {
|
||||
override fun updateDrawState(ds: TextPaint?) {
|
||||
super.updateDrawState(ds)
|
||||
ds?.isUnderlineText = false;
|
||||
ds?.isUnderlineText = false
|
||||
}
|
||||
}
|
||||
|
|
@ -264,6 +264,7 @@ public class NotificationHelper {
|
|||
.setDeleteIntent(deletePendingIntent)
|
||||
.setColor(ContextCompat.getColor(context, (R.color.primary)))
|
||||
.setGroup(account.getAccountId())
|
||||
.setAutoCancel(true)
|
||||
.setDefaults(0); // So it doesn't ring twice, notify only in Target callback
|
||||
|
||||
setupPreferences(account, builder);
|
||||
|
|
@ -521,7 +522,6 @@ public class NotificationHelper {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static String bodyForType(Notification notification) {
|
||||
switch (notification.getType()) {
|
||||
case FOLLOW:
|
||||
|
|
|
|||
|
|
@ -1,17 +1,9 @@
|
|||
package com.keylesspalace.tusky.util;
|
||||
|
||||
import android.util.Patterns;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
public class StringUtils {
|
||||
|
||||
public final static String carriageReturn = System.getProperty("line.separator");
|
||||
final static String QUOTE = "\"";
|
||||
|
||||
public static String randomAlphanumericString(int count) {
|
||||
char[] chars = new char[count];
|
||||
Random random = new Random();
|
||||
|
|
@ -22,13 +14,4 @@ public class StringUtils {
|
|||
return new String(chars);
|
||||
}
|
||||
|
||||
static List<String> extractUrl(String text) {
|
||||
List<String> links = new ArrayList<>();
|
||||
Matcher m = Patterns.WEB_URL.matcher(text);
|
||||
while (m.find()) {
|
||||
String url = m.group();
|
||||
links.add(url);
|
||||
}
|
||||
return links;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue