Remove several threads fixes battery drain
(cherry picked from commit 6e70d465f27a0c2d9a18441f532acc61005097f1)
This commit is contained in:
parent
842d1bd8dc
commit
e9516c173e
5 changed files with 49 additions and 60 deletions
|
@ -11,48 +11,9 @@
|
|||
"type": "UNIVERSAL",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 170,
|
||||
"versionName": "1.7.9.5.2",
|
||||
"outputFile": "monocles chat-1.7.9.5.2-git-universal-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "armeabi-v7a"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 17001,
|
||||
"versionName": "1.7.9.5.2",
|
||||
"outputFile": "monocles chat-1.7.9.5.2-git-armeabi-v7a-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "x86_64"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 17003,
|
||||
"versionName": "1.7.9.5.2",
|
||||
"outputFile": "monocles chat-1.7.9.5.2-git-x86_64-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "x86"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 17002,
|
||||
"versionName": "1.7.9.5.2",
|
||||
"outputFile": "monocles chat-1.7.9.5.2-git-x86-release.apk"
|
||||
"versionCode": 171,
|
||||
"versionName": "1.7.9.5.3",
|
||||
"outputFile": "monocles chat-1.7.9.5.3-git-universal-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
|
@ -63,9 +24,48 @@
|
|||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 17004,
|
||||
"versionName": "1.7.9.5.2",
|
||||
"outputFile": "monocles chat-1.7.9.5.2-git-arm64-v8a-release.apk"
|
||||
"versionCode": 17104,
|
||||
"versionName": "1.7.9.5.3",
|
||||
"outputFile": "monocles chat-1.7.9.5.3-git-arm64-v8a-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "x86_64"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 17103,
|
||||
"versionName": "1.7.9.5.3",
|
||||
"outputFile": "monocles chat-1.7.9.5.3-git-x86_64-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "armeabi-v7a"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 17101,
|
||||
"versionName": "1.7.9.5.3",
|
||||
"outputFile": "monocles chat-1.7.9.5.3-git-armeabi-v7a-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "x86"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 17102,
|
||||
"versionName": "1.7.9.5.3",
|
||||
"outputFile": "monocles chat-1.7.9.5.3-git-x86-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
|
|
|
@ -2861,9 +2861,7 @@ public class XmppConnectionService extends Service {
|
|||
private void markChangedFiles(List<DatabaseBackend.FilePathInfo> infos) {
|
||||
final boolean[] changed = {false};
|
||||
for (Conversation conversation : getConversations()) {
|
||||
new Thread( new Runnable() { @Override public void run() {
|
||||
changed[0] |= conversation.markAsChanged(infos);
|
||||
} } ).start();
|
||||
changed[0] |= conversation.markAsChanged(infos);
|
||||
}
|
||||
if (changed[0]) {
|
||||
updateConversationUi();
|
||||
|
|
|
@ -1943,7 +1943,6 @@ public class ConversationFragment extends XmppFragment
|
|||
|
||||
|
||||
public void LoadStickers() {
|
||||
activity.runOnUiThread(() -> {
|
||||
if (!hasStoragePermission(activity)) return;
|
||||
// Load and show Stickers
|
||||
if (!dirStickers.exists()) {
|
||||
|
@ -1988,11 +1987,9 @@ public class ConversationFragment extends XmppFragment
|
|||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public void LoadGifs() {
|
||||
activity.runOnUiThread(() -> {
|
||||
if (!hasStoragePermission(activity)) return;
|
||||
// Load and show GIFs
|
||||
if (!dirGifs.exists()) {
|
||||
|
@ -2037,7 +2034,6 @@ public class ConversationFragment extends XmppFragment
|
|||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
protected void newThreadTutorialToast(String s) {
|
||||
|
|
|
@ -1331,11 +1331,8 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
|
|||
|
||||
@Override
|
||||
public void onRosterUpdate() {
|
||||
new Thread( new Runnable() { @Override public void run() {
|
||||
refreshForNewCaps = true;
|
||||
refreshUi();
|
||||
} } ).start();
|
||||
|
||||
refreshForNewCaps = true;
|
||||
refreshUi();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -303,9 +303,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
|
|||
|
||||
@Override
|
||||
public void onRosterUpdate() {
|
||||
new Thread( new Runnable() { @Override public void run() {
|
||||
refreshUi();
|
||||
} } ).start();
|
||||
refreshUi();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue