mesge retrieve limit uppe to 1000
This commit is contained in:
parent
6dcdc415fa
commit
52c0d849d7
2 changed files with 6 additions and 5 deletions
|
|
@ -40,7 +40,7 @@ export default {
|
||||||
this.$store.commit("setMobile", this.checkIfMobile());
|
this.$store.commit("setMobile", this.checkIfMobile());
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$router.beforeEach(async (to) => {
|
this.$router.beforeEach(async () => {
|
||||||
if (!this.zulipClient || this.streams.length == 0) {
|
if (!this.zulipClient || this.streams.length == 0) {
|
||||||
await this.getStreams()
|
await this.getStreams()
|
||||||
}
|
}
|
||||||
|
|
@ -62,10 +62,11 @@ export default {
|
||||||
checkIfMobile: () => window.innerWidth < 700,
|
checkIfMobile: () => window.innerWidth < 700,
|
||||||
|
|
||||||
getStreams() {
|
getStreams() {
|
||||||
return new Promise((resolve) => {
|
return new Promise(resolve => {
|
||||||
api.zulip.init().then((client) => {
|
api.zulip.init().then((client) => {
|
||||||
this.zulipClient = client;
|
this.zulipClient = client;
|
||||||
api.zulip.getStreams(client).then((result) => {
|
api.zulip.getStreams(client).then((result) => {
|
||||||
|
console.log(result.streams)
|
||||||
this.$store.commit(
|
this.$store.commit(
|
||||||
"setStreams",
|
"setStreams",
|
||||||
result.streams.filter((s) => s.name.startsWith(this.pubStr))
|
result.streams.filter((s) => s.name.startsWith(this.pubStr))
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@ const
|
||||||
.messages
|
.messages
|
||||||
.retrieve(params || {
|
.retrieve(params || {
|
||||||
anchor: "newest",
|
anchor: "newest",
|
||||||
num_before: 100,
|
// num_before: 100,
|
||||||
num_after: 0,
|
// num_after: 0,
|
||||||
// apply_markdown: false,
|
// apply_markdown: false,
|
||||||
narrow: [
|
narrow: [
|
||||||
{ operator: "stream", operand: stream },
|
{ operator: "stream", operand: stream },
|
||||||
|
|
@ -50,7 +50,7 @@ const
|
||||||
.messages
|
.messages
|
||||||
.retrieve(params || {
|
.retrieve(params || {
|
||||||
anchor: "newest",
|
anchor: "newest",
|
||||||
num_before: 100,
|
num_before: 1000,
|
||||||
num_after: 0,
|
num_after: 0,
|
||||||
// apply_markdown: false,
|
// apply_markdown: false,
|
||||||
narrow: [{ operator: "stream", operand: stream }],
|
narrow: [{ operator: "stream", operand: stream }],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue