Skip to content
Snippets Groups Projects
Commit 48842fa5 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fixed a bug in the message formatter

parent a55cf22e
Branches
Tags
No related merge requests found
...@@ -103,6 +103,7 @@ public class Client extends AClient { ...@@ -103,6 +103,7 @@ public class Client extends AClient {
this.backlogManager = new BacklogManager(this, backlogStorage); this.backlogManager = new BacklogManager(this, backlogStorage);
this.backlogManager.init("", provider, this); this.backlogManager.init("", provider, this);
this.notificationManager = new NotificationManager(this); this.notificationManager = new NotificationManager(this);
this.initialized = true;
} }
public QBufferViewManager bufferViewManager() { public QBufferViewManager bufferViewManager() {
......
...@@ -23,7 +23,6 @@ package de.kuschku.libquassel.syncables.types.impl; ...@@ -23,7 +23,6 @@ package de.kuschku.libquassel.syncables.types.impl;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.util.Log;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
...@@ -53,7 +52,6 @@ public class BacklogManager extends ABacklogManager<BacklogManager> { ...@@ -53,7 +52,6 @@ public class BacklogManager extends ABacklogManager<BacklogManager> {
@Override @Override
public void requestMoreBacklog(int bufferId, int amount) { public void requestMoreBacklog(int bufferId, int amount) {
Log.d("libquassel", "request more backlog for id " + bufferId + ": " + amount);
Message last; Message last;
if (storage.getUnfiltered(bufferId).isEmpty() || null == (last = storage.getUnfiltered(bufferId).last())) if (storage.getUnfiltered(bufferId).isEmpty() || null == (last = storage.getUnfiltered(bufferId).last()))
requestBacklogInitial(bufferId, amount); requestBacklogInitial(bufferId, amount);
...@@ -64,14 +62,12 @@ public class BacklogManager extends ABacklogManager<BacklogManager> { ...@@ -64,14 +62,12 @@ public class BacklogManager extends ABacklogManager<BacklogManager> {
@Override @Override
public void requestBacklogInitial(int id, int amount) { public void requestBacklogInitial(int id, int amount) {
Log.d("libquassel", "request initial backlog for id " + id + ": " + amount);
requestBacklog(id, -1, -1, amount, 0); requestBacklog(id, -1, -1, amount, 0);
} }
@Override @Override
public void _requestBacklog(int id, int first, int last, int limit, int additional) { public void _requestBacklog(int id, int first, int last, int limit, int additional) {
// Do nothing, we are on the client // Do nothing, we are on the client
Log.d("libquassel", "request backlog for id " + id);
} }
@Override @Override
...@@ -81,14 +77,11 @@ public class BacklogManager extends ABacklogManager<BacklogManager> { ...@@ -81,14 +77,11 @@ public class BacklogManager extends ABacklogManager<BacklogManager> {
storage.insertMessages(id, messages.toArray(new Message[messages.size()])); storage.insertMessages(id, messages.toArray(new Message[messages.size()]));
client.initBacklog(id); client.initBacklog(id);
provider.sendEvent(new BacklogReceivedEvent(id)); provider.sendEvent(new BacklogReceivedEvent(id));
Log.d("libquassel", "received backlog for id " + id);
} }
@Override @Override
public void _requestBacklogAll(int first, int last, int limit, int additional) { public void _requestBacklogAll(int first, int last, int limit, int additional) {
// Do nothing, we are on the client // Do nothing, we are on the client
Log.d("libquassel", "request backlog for all");
} }
@Override @Override
...@@ -102,7 +95,6 @@ public class BacklogManager extends ABacklogManager<BacklogManager> { ...@@ -102,7 +95,6 @@ public class BacklogManager extends ABacklogManager<BacklogManager> {
} }
for (int id : buffers) { for (int id : buffers) {
provider.sendEvent(new BacklogReceivedEvent(id)); provider.sendEvent(new BacklogReceivedEvent(id));
Log.d("libquassel", "received backlog for id " + id);
} }
} }
......
...@@ -157,7 +157,7 @@ public class MessageUtil { ...@@ -157,7 +157,7 @@ public class MessageUtil {
Spannable.SPAN_INCLUSIVE_EXCLUSIVE); Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
} }
if (bg != -1 && themeUtil.res.mircColors[fg] != COLOR_TRANSPARENT) { if (bg != -1 && themeUtil.res.mircColors[fg] != COLOR_TRANSPARENT) {
newString.setSpan(new BackgroundColorSpan(themeUtil.res.mircColors[fg]), start, end, newString.setSpan(new BackgroundColorSpan(themeUtil.res.mircColors[bg]), start, end,
Spannable.SPAN_INCLUSIVE_EXCLUSIVE); Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment