Fix #89
This commit is contained in:
		
							parent
							
								
									5a9b2a1255
								
							
						
					
					
						commit
						a41a05de31
					
				
					 5 changed files with 62 additions and 38 deletions
				
			
		| 
						 | 
					@ -2,13 +2,17 @@ ChangeLog (Release Notes)
 | 
				
			||||||
=========================
 | 
					=========================
 | 
				
			||||||
主に notable な changes を書いていきます
 | 
					主に notable な changes を書いていきます
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					unreleased
 | 
				
			||||||
 | 
					----------
 | 
				
			||||||
 | 
					* Fix: 非ログイン状態ですべてのページが致命的な問題を発生させる (#89)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2742 (2017/10/25)
 | 
					2742 (2017/10/25)
 | 
				
			||||||
-----------------
 | 
					-----------------
 | 
				
			||||||
* トラブルシューティングを実装するなど
 | 
					* New: トラブルシューティングを実装するなど
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2735 (2017/10/22)
 | 
					2735 (2017/10/22)
 | 
				
			||||||
-----------------
 | 
					-----------------
 | 
				
			||||||
* モバイル版からでもクライアントバージョンを確認できるように
 | 
					* New: モバイル版からでもクライアントバージョンを確認できるように
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2732 (2017/10/22)
 | 
					2732 (2017/10/22)
 | 
				
			||||||
-----------------
 | 
					-----------------
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -424,6 +424,7 @@
 | 
				
			||||||
		import compile from '../../common/scripts/text-compiler';
 | 
							import compile from '../../common/scripts/text-compiler';
 | 
				
			||||||
		import dateStringify from '../../common/scripts/date-stringify';
 | 
							import dateStringify from '../../common/scripts/date-stringify';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							this.mixin('i');
 | 
				
			||||||
		this.mixin('api');
 | 
							this.mixin('api');
 | 
				
			||||||
		this.mixin('stream');
 | 
							this.mixin('stream');
 | 
				
			||||||
		this.mixin('user-preview');
 | 
							this.mixin('user-preview');
 | 
				
			||||||
| 
						 | 
					@ -462,24 +463,31 @@
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this.capture = withHandler => {
 | 
							this.capture = withHandler => {
 | 
				
			||||||
			this.stream.send({
 | 
								if (this.SIGNIN) {
 | 
				
			||||||
				type: 'capture',
 | 
									this.stream.send({
 | 
				
			||||||
				id: this.post.id
 | 
										type: 'capture',
 | 
				
			||||||
			});
 | 
										id: this.post.id
 | 
				
			||||||
			if (withHandler) this.stream.on('post-updated', this.onStreamPostUpdated);
 | 
									});
 | 
				
			||||||
 | 
									if (withHandler) this.stream.on('post-updated', this.onStreamPostUpdated);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this.decapture = withHandler => {
 | 
							this.decapture = withHandler => {
 | 
				
			||||||
			this.stream.send({
 | 
								if (this.SIGNIN) {
 | 
				
			||||||
				type: 'decapture',
 | 
									this.stream.send({
 | 
				
			||||||
				id: this.post.id
 | 
										type: 'decapture',
 | 
				
			||||||
			});
 | 
										id: this.post.id
 | 
				
			||||||
			if (withHandler) this.stream.off('post-updated', this.onStreamPostUpdated);
 | 
									});
 | 
				
			||||||
 | 
									if (withHandler) this.stream.off('post-updated', this.onStreamPostUpdated);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this.on('mount', () => {
 | 
							this.on('mount', () => {
 | 
				
			||||||
			this.capture(true);
 | 
								this.capture(true);
 | 
				
			||||||
			this.stream.on('_connected_', this.onStreamConnected);
 | 
					
 | 
				
			||||||
 | 
								if (this.SIGNIN) {
 | 
				
			||||||
 | 
									this.stream.on('_connected_', this.onStreamConnected);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (this.p.text) {
 | 
								if (this.p.text) {
 | 
				
			||||||
				const tokens = this.p.ast;
 | 
									const tokens = this.p.ast;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,7 +5,7 @@
 | 
				
			||||||
	<div class="content">
 | 
						<div class="content">
 | 
				
			||||||
		<yield />
 | 
							<yield />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
	<mk-stream-indicator/>
 | 
						<mk-stream-indicator if={ SIGNIN }/>
 | 
				
			||||||
	<style>
 | 
						<style>
 | 
				
			||||||
		:scope
 | 
							:scope
 | 
				
			||||||
			display block
 | 
								display block
 | 
				
			||||||
| 
						 | 
					@ -416,22 +416,26 @@
 | 
				
			||||||
		this.page = this.opts.page;
 | 
							this.page = this.opts.page;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this.on('mount', () => {
 | 
							this.on('mount', () => {
 | 
				
			||||||
			this.stream.on('read_all_messaging_messages', this.onReadAllMessagingMessages);
 | 
								if (this.SIGNIN) {
 | 
				
			||||||
			this.stream.on('unread_messaging_message', this.onUnreadMessagingMessage);
 | 
									this.stream.on('read_all_messaging_messages', this.onReadAllMessagingMessages);
 | 
				
			||||||
 | 
									this.stream.on('unread_messaging_message', this.onUnreadMessagingMessage);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			// Fetch count of unread messaging messages
 | 
									// Fetch count of unread messaging messages
 | 
				
			||||||
			this.api('messaging/unread').then(res => {
 | 
									this.api('messaging/unread').then(res => {
 | 
				
			||||||
				if (res.count > 0) {
 | 
										if (res.count > 0) {
 | 
				
			||||||
					this.update({
 | 
											this.update({
 | 
				
			||||||
						hasUnreadMessagingMessages: true
 | 
												hasUnreadMessagingMessages: true
 | 
				
			||||||
					});
 | 
											});
 | 
				
			||||||
				}
 | 
										}
 | 
				
			||||||
			});
 | 
									});
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		});
 | 
							});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this.on('unmount', () => {
 | 
							this.on('unmount', () => {
 | 
				
			||||||
			this.stream.off('read_all_messaging_messages', this.onReadAllMessagingMessages);
 | 
								if (this.SIGNIN) {
 | 
				
			||||||
			this.stream.off('unread_messaging_message', this.onUnreadMessagingMessage);
 | 
									this.stream.off('read_all_messaging_messages', this.onReadAllMessagingMessages);
 | 
				
			||||||
 | 
									this.stream.off('unread_messaging_message', this.onUnreadMessagingMessage);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		});
 | 
							});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this.onReadAllMessagingMessages = () => {
 | 
							this.onReadAllMessagingMessages = () => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -467,6 +467,7 @@
 | 
				
			||||||
		import getPostSummary from '../../../../common/get-post-summary.ts';
 | 
							import getPostSummary from '../../../../common/get-post-summary.ts';
 | 
				
			||||||
		import openPostForm from '../scripts/open-post-form';
 | 
							import openPostForm from '../scripts/open-post-form';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							this.mixin('i');
 | 
				
			||||||
		this.mixin('api');
 | 
							this.mixin('api');
 | 
				
			||||||
		this.mixin('stream');
 | 
							this.mixin('stream');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -502,24 +503,31 @@
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this.capture = withHandler => {
 | 
							this.capture = withHandler => {
 | 
				
			||||||
			this.stream.send({
 | 
								if (this.SIGNIN) {
 | 
				
			||||||
				type: 'capture',
 | 
									this.stream.send({
 | 
				
			||||||
				id: this.post.id
 | 
										type: 'capture',
 | 
				
			||||||
			});
 | 
										id: this.post.id
 | 
				
			||||||
			if (withHandler) this.stream.on('post-updated', this.onStreamPostUpdated);
 | 
									});
 | 
				
			||||||
 | 
									if (withHandler) this.stream.on('post-updated', this.onStreamPostUpdated);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this.decapture = withHandler => {
 | 
							this.decapture = withHandler => {
 | 
				
			||||||
			this.stream.send({
 | 
								if (this.SIGNIN) {
 | 
				
			||||||
				type: 'decapture',
 | 
									this.stream.send({
 | 
				
			||||||
				id: this.post.id
 | 
										type: 'decapture',
 | 
				
			||||||
			});
 | 
										id: this.post.id
 | 
				
			||||||
			if (withHandler) this.stream.off('post-updated', this.onStreamPostUpdated);
 | 
									});
 | 
				
			||||||
 | 
									if (withHandler) this.stream.off('post-updated', this.onStreamPostUpdated);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this.on('mount', () => {
 | 
							this.on('mount', () => {
 | 
				
			||||||
			this.capture(true);
 | 
								this.capture(true);
 | 
				
			||||||
			this.stream.on('_connected_', this.onStreamConnected);
 | 
					
 | 
				
			||||||
 | 
								if (this.SIGNIN) {
 | 
				
			||||||
 | 
									this.stream.on('_connected_', this.onStreamConnected);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (this.p.text) {
 | 
								if (this.p.text) {
 | 
				
			||||||
				const tokens = this.p.ast;
 | 
									const tokens = this.p.ast;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,7 @@
 | 
				
			||||||
	<div class="content">
 | 
						<div class="content">
 | 
				
			||||||
		<yield />
 | 
							<yield />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
	<mk-stream-indicator/>
 | 
						<mk-stream-indicator if={ SIGNIN }/>
 | 
				
			||||||
	<style>
 | 
						<style>
 | 
				
			||||||
		:scope
 | 
							:scope
 | 
				
			||||||
			display block
 | 
								display block
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue